2012-11-15 90 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" 

一旦浏览器是一个外部应用程序,它没有访问您的活动的权限。