2012-04-06 10 views
1

signpostライブラリを使用してAndroidでOauthを実装する際に問題があります。アクセスを許可した後、アプリケーション自体に戻るべき最後の部分を除いて、すべてが問題ありません。以下は Android Google Oauth:アクセスを許可した後にアプリケーションに戻りません

はマニフェストで私の活動のコールバックの宣言です:

<activity android:name="ro.locationsApp.android.login.LoginScreenActivity" 
     android:screenOrientation="portrait" 
     android:launchMode="singleTask"> 
     <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="http" android:host="myCallbackHost"/> 
     </intent-filter> 
    </activity> 

そして、私はこのようなコードからコールバックURLを渡します。それは現実と機能のリンクですmyCallbackHost

new OAuthHelper("mySite", "secret", 
     "https://www.googleapis.com/auth/userinfo.profile", "http://myCallbackHost"); 

を(それも使われていますWebサイト認証後のコールバック用 - 今でもモバイルが欲しい)

問題は、その後にアンドロイドアプリが呼び出されないという問題です。また、私は成功せず

<data android:scheme="customScheme"/> 

new OAuthHelper("mySite", "secret", 
    "https://www.googleapis.com/auth/userinfo.profile", "customScheme:///"); 

を試してみました。

おかげで、

アレックス。

答えて

0

httpで何かを変更すると動作します。ここで

は私のマニフェストは、今どのように見えるかです:

<activity android:name="ro.locationsApp.android.login.LoginScreenActivity" 
    android:screenOrientation="portrait" 
    android:launchMode="singleTask"> 
    <intent-filter> 
     <category android:name="android.intent.category.LUNCHER" /> 
    </intent-filter> 
    <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="alex" android:host="me"/> 
    </intent-filter> 
</activity> 

やコード:魅力のような

new OAuthHelper("mySite", "secret", 
"https://www.googleapis.com/auth/userinfo.profile", "alex://me"); 

作品。

+0

あなたはICSがインストールされていて、動作している場合、アンドロイドICS – nicky

+0

はい、Sony Ericsson Xperia Arc Sでチェックしましたか? –

関連する問題