0

When Twitter starts to redirect back to my application from the browser, the browser will close and produces an error below:

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

Here's the activity on my manifest:

<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>

Where did I go wrong?

Lawrence Gimenez
  • 2,662
  • 4
  • 34
  • 52

1 Answers1

0

Change from

android:exported="false"

to

android:exported="true"

Once the browser is an external application, it doesn't have the permission to access your activity.

MKB
  • 7,587
  • 9
  • 45
  • 71
ansorod
  • 367
  • 1
  • 5