1
所以使用回調開放的,這是我的清單:android系統不工作
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="info.dierrelabs.h4m"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".H4M"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="h4m-android-app" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
在我的活動我宣佈我的URI爲:
private static final Uri HT_CALLBACK_URI = Uri.parse("h4m-android-app:///");
但是當網站發送的用戶回來我得到:
You don't have the permission to open this page h4m-android-app:///?oauth..blablabla
我甚至用h4m-android-app://
代替h4m-android-app:///
但沒有改變審判。
「你不能綁定一個android:scheme到你有MAIN和LAUNCHER的地方」,這些話是這裏的關鍵。花了我幾個小時才弄明白。也檢查了這一點:http://stackoverflow.com/questions/5545803/android-dev-callback-url-not-working-0-o – 2012-04-16 07:45:50
這是在android ICS的工作 – nicky 2012-07-01 04:58:37