A special Android scheme that does not work on some devices

I created a custom schema for my application by adding this to my activity in the android manifest:

<activity android:name=".TabHostActivity" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.action.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.LAUNCHER" /> <data android:scheme="myscheme" /> </intent-filter> </activity> 

When I write "myscheme: //", in the Android browser, it opens my application (on some devices). The problem is that this does not work on the Samsung and Xperia galaxies. It searches only myscheme: // on google.

Does anyone know what's wrong here?

Any help would be appreciated :)

+6
source share
1 answer

Usually browsers look for a term or add "http: //" in front of it, if it is not already present. I guess this is happening here.

If you create an HTML page with a link to myscheme: //, your application should appear in the selection list.

Something like this: <a href="myscheme://it_worked"> click this link </a>

0
source

Source: https://habr.com/ru/post/892339/


All Articles