billsecond
billsecond

Reputation: 612

Intent Filters with Android

I can't seem to figure out the app manifest for intent filters...

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" package="com.test.test" android:versionCode="1" android:versionName="1">
    <uses-sdk android:targetSdkVersion="8" />
  <application android:icon="@drawable/icon">

    <activity>
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <data android:scheme="myapp" />
      </intent-filter>
    </activity>
    <activity android:name=".AddNewActivity">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <data android:scheme="myapp" />
      </intent-filter>
    </activity>
  </application>

</manifest>

I am trying to have myapp://somesite.com/file.test open up within my app.

Upvotes: 0

Views: 2213

Answers (1)

user2615862
user2615862

Reputation: 159

It looks like you have two activities. Both are Listed as "android.intent.action.MAIN". Only your actual main activity can have the LAUNCHER and MAIN attribute.

Switch your second activity from 'MAIN' to 'AnyName' and 'LAUNCHER' to default.

Upvotes: 1

Related Questions