I implemented a custom URL scheme on Android and iOS, with the idea that we send the user an “activation” that clicks on the link that launches their own application.
Technically, we send an email in HTML format with a link, for example:
<a href="myapp://activate/accountId/uniquetoken">Click to activate</a>
It works fine on iOS, but it doesn’t work on Android.
I saw several other SO posts and similar things that the android itself should handle a custom URL scheme , but indicate that it is a Chrome browser and GMail for Android application that robs the user myapp://URL.
Following the recommendations of some of these posts, I tried to create an intent url. I tried all of the following
intent://activate
intent://
but none of them worked. None of them were available from the GMail Android app on Android 6, and the android documentation in the format for the intentional uri is incredibly poorly documented. The best I can find is "programmatically create your intent in Java and then call .toUri on it" (this is how I produced most of the broken oral uri above)
Any help would be greatly appreciated
Update 1. Here is my activity and intent from the Android manifest
<activity android:name=".ui.MainActivity" android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="myapp" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
I tried setting up a web server that "mirrors" back to the user application schema, and this works for both Android and iOS
<a href="http://mycloudserver.net/myapp/activate/accountId/uniqueToken">Click</a>
This page redirects 302 to
myapp:
- (Chrome android) , - , ( ) Gmail android.
, .
iOS Safari, , .