2012-11-15 89 views
0

當Twitter的開始重定向回從瀏覽器我的應用程序,瀏覽器會關閉併產生以下錯誤:Twitter的重定向的OAuth權限拒絕錯誤

E/AndroidRuntime(11074): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=twitter-oauth-law://callback?oauth_token=lCW9243XEnyB4wmxw7Mf6iiDn3jBaWUeUaZuv416g&oauth_verifier=V55nJV1Cxk0nZIlsV3n9JfJHZoD575S7gbd23H0L48 cmp=com.barrioofcodes.sad/.Accounts (has extras) } from ProcessRecord{40eeed80 11074:com.android.browser/u0a10026} (pid=11074, uid=10026) not exported from uid 10047 

這裏是我的清單中的活動:

<activity 
      android:name=".Accounts" 
      android:theme="@android:style/Theme.NoTitleBar" 
      android:exported="false" 
      android:label="@string/title_activity_main"> 
      <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="twitter-oauth-law" android:host="callback" /> 
      </intent-filter> 
     </activity> 

我哪裏出錯了?

回答

0

android:exported="false" 

更改爲

android:exported="true" 

一旦瀏覽器是一個外部應用程序,它沒有訪問您的活動的權限。