2
votes

I'm developing an app for iOS and Android that i want users to be able to launch when they receive a SMS message that contains a link.

The link includes the app package as well as encrypted data in the following format:

"com.app.myapp://?<encrypted data>" (the <> brackets are not included and the encrypted data is never over 120 characters)

On iOS, this works perfectly as the SMS link comes in correctly hyperlinked to include all of the encrypted data, the app launches and all is well.

Android on the other hand, the link comes in broken...only the "com.app.myapp" is hyperlinked, which still launches the app when clicked, but it does not pass the encrypted data. So it seems like Android is breaking the link.

One fix i had for android was to add "http://" to the beginning of the link, this kept the hyperlink fully intact in Android, but on iOS the link with http would no longer launch the app. Also removing the ':' after the package name fixed it for Android, but again broke the iOS functionality.

I know its not an app issue, its more a Android Messages issue / possibly a link formatting issue. Is there another solution i can try?

1
You can use deep links or unviersal links: developer.apple.com/library/content/documentation/General/…MichaelV
Thanks, but there is no website associated to my app and this doesnt look like it supports Android. The messages need to come through SMS and work for both OS'RH201
Is it because you have no base path in your uri? Have you tried myapp://load_data?<encrypted_data>?wottle
Adding 'load_data' doesnt appear to make any difference, the link is still not clickable in the SMS message which is an absolute mustRH201

1 Answers

1
votes

You cannot add http:// in front of com.app.myapp:// because they are both uri schemes. You should familiarize yourself with the difference between URI Schemes and App Links. Since you are using URI schemes to accomplish this, you should not be using .. Your URI scheme should look something like myapp:// not com.app.myapp://. This is probably why Android Messenger is ignoring everything after the ://.

An easier solution would be to use Branch SDK and pass along the encrypted data in the link data.

EDIT

Android messenger does not recognize raw URI schemes as clickable links. You probably still need to use http for android. You should look into using Android app links and iOS universal links. These take a bit more set up but should handle links in both cases