Redirecting from the browser to my app - schemes?

Put your problem here if it does not fit any of the other categories.

Redirecting from the browser to my app - schemes?

Postby Cylindric » Wed Jun 30, 2010 1:27 pm

Hello folks,

I'm trying to get OAuth to work against the Google Wave Data API on my HTC Desire running Android 2.1.

I'm able to get the request and authentication URLs okay, and I'm happily firing up a browser window from my app so the user can click the "allow" button. The problem is after that, when Google redirects me to braindump://wave (my custom scheme), the app doesn't handle it. Instead I get an error

Code: Select all
You do not have permission to open this page. braindump://wave?oauth_verifier=x&oauth_token=y


My AndroidManifest.xml is such:
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3.         package="org.enigmagen.braindump" android:versionName="0.1"
  4.         android:versionCode="1">
  5.         <application android:icon="@drawable/icon" android:label="@string/app_name"
  6.                 android:debuggable="true">
  7.                 <activity android:name="BrainDump"
  8.                           android:label="@string/app_name"
  9.                               android:launchMode="singleInstance">
  10.                         <intent-filter>
  11.                                 <action android:name="android.intent.action.MAIN" />
  12.                                 <category android:name="android.intent.category.LAUNCHER" />
  13.                                 <category android:name="android.intent.category.DEFAULT" />
  14.                                 <category android:name="android.intent.category.BROWSABLE" />
  15.                                 <data android:scheme="braindump" />
  16.                         </intent-filter>
  17.                 </activity>
  18.                 <!--  activity android:name=".NoteEdit"></activity -->
  19.         </application>
  20.         <uses-sdk android:minSdkVersion="7"></uses-sdk>
  21.  
  22.         <uses-permission android:name="android.permission.INTERNET"></uses-permission>
  23. </manifest>
Parsed in 0.004 seconds, using GeSHi 1.0.8.4


I'm starting the browser using this in my main code:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. this.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authUrl)));
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


As a complete noob to the whole Android platform, I'm hoping it's just something daft I've not done right ;)
Cylindric
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Jun 30, 2010 1:14 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google Feedfetcher, MSNbot Media and 19 guests