Kuukie:
For the Redirect URI, create your own custom URI scheme (example: glitchandroidsdk://auth)
Auth mode should be set to token.
Auth scope should be set to the max scope that you'll be using in your app. API methods require different scopes based on what type of interaction they have with Glitch. See more info about scopes here:
http://developer.glitch.com/docs/scopes/
(Staff reply)
Posted 14 months ago by
Brady

|
Permalink
Thanks, now I can start Tinkering :)
Posted 14 months ago by
Kuukie

|
Permalink
I've tried this, following the sample app that comes in the SDK, but after I log in and hit "allow", I just get a "you do not have permission to open this page [my custom URI}#access_token=......"
Posted 14 months ago by
Gdiddy

|
Permalink
Gdiddy: You'll need to add a data element to your intent filter in your AndroidManifest.xml like so:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="glitchandroidsdk"/>
</intent-filter>
Replace "glitchandroidsdk" with your own custom URI scheme.
See the sample AndroidManifest.xml here:
https://github.com/tinyspeck/glitch-android-sdk/blob/master/sample/AndroidManifest.xml
Posted 14 months ago by
Brady

|
Permalink
Aha! That's the missing piece of info I needed! Thank you Brady!
Posted 14 months ago by
Gdiddy

|
Permalink
:( No dice. I've basically followed everything in the example, and I'm still getting the permission error. I created an API key using my own scheme name. I changed the Manifest to match, and I put the URI in the code.
Posted 14 months ago by
Gdiddy

|
Permalink
Is the permission error happening in your Android browser?
Check that you have permissions set in your Android manifest like below:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Also, be sure to validate that you have the same redirect URI set up here:
http://developer.glitch.com/keys/
(Staff reply)
Posted 14 months ago by
Brady

|
Permalink
It's happening in the browser. It never redirects back to the app.
Both of those use-permission entries are there, and I used the same URI in my key. And I'm using the right key.
It logs in, it gives me the "Allow/Deny" option, then after that, the no permission error in the browser.
Posted 14 months ago by
Gdiddy

|
Permalink