The best solution that I came up with was to use a TwitterButton instead of a TwitterAuthClient. Check out the code:
Using TwitterAuthClient is also okay but if you plan to make it as a static variable, Android Studio will show up with a warning that since this uses a context, leaks may be possible which is the reason why I decided to use the TwitterButton class instead.
Instantiate the TwitterButton class and call the performClick() method.
Make sure in your in the onActivityResult() of your Activity class, you call this code:
This was a painstaking experience because it took me countless forum posts that mostly never worked for my scenario until I came across one that did the trick. And the post topic was not even about having problems signing in to a Microsoft account from a local account in Windows 10.
What did solve for me was by executing a command in Powershell for a broken Start Menu (since this is also where Cortana can be found at first run).
Open Windows PowerShell as Administrator
Right click Start button
Choose Command prompt (Admin)
Key in Powershell in the black window and hit Enter
Paste the following command in the Administrator: Windows PowerShell window and press Enter key:
So yeah, here is the thing. The Google Play Service documentation enables you to add test accounts to test your app when they are not yet published.
I had been looking for ways to do the same even if the game or its game services are published but to no avail.
Heck, publish or unpublished, the test accounts were unable to log in. It would also be quite a hassle to manually export the Android app to APK and install it into the device or emulator just to debug.
It took my quite some time to find the right keywords in my Google search that I was able to find a solution to this.
Use your release certificate as your debug certificate. But how?! Good question. In Eclipse, you can set a custom debug key by going to Preferences > Android > Build and selecting the keystore file of your choice, in this case the release keystore.
Problem is, you will encounter an error message that says “Keystore was tampered with, or password was incorrect”.
There are 3 things to consider why this happens:
The keystore password must be “android”
It must contain a key named “androiddebugkey”
The key’s password must be “android”
I know you came upon this post to look for a solution so I will stop here because I am sure you do not care the explanations so long as you are able to convert your release keystore into the debug keystore.