0

Just wondering why this isn't working for me:

<activity android:name=".activities.MainDrawerActivity"
        android:screenOrientation="portrait"
        android:exported="true"
        android:theme="@style/Theme.Sherlock.Light"
    android:windowSoftInputMode="adjustNothing">
        <intent-filter>
            <data android:scheme="myapp" />
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>
    </activity>

When I open my browser and type myapp://test nothing happens. Am I missing something?

6
  • try this: <data android:scheme="myapp" android:host="test"/>. By the way, have you seen this: stackoverflow.com/questions/4023273/android-custom-url-scheme and stackoverflow.com/questions/2448213/… ? Commented May 13, 2015 at 12:22
  • I've seen them both and tried your example and still doesn't work. Maybe I'm testing it wrong. Can I just put that url in my browser? Commented May 13, 2015 at 12:29
  • yes, you can. custom urls are deprecated in fact, but it should works. what android version do you have? Commented May 13, 2015 at 12:46
  • 4.2.2 - if they are deprecated what is used now to do custom urls? Commented May 13, 2015 at 13:08
  • the right way is using the default schemes: stackoverflow.com/a/525086/3345366 or stackoverflow.com/a/1609662/3345366. But the custom schemes on android 4.2.2 works too. Maybe, you need to correct your handler? Commented May 13, 2015 at 13:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.