简体   繁体   中英

How to add a link to the Android or iOS app store in an SMS depending on OS?

I have a mobile application in iOS and Android formats. I run a server containing a database of user telephone numbers, for the purposes of sending an SMS message via Twilio. However, I don't know what operating system each number is associated with. The app does not make HTTP contact with the server.

I want to send a link to each of my users by SMS, which will redirect to the appropriate app store depending on their operating system. Facebook does this - does anyone know how they do it? Do they detect the operating system via the phone number?

Basically, once user click on that link it should automatically redirects to appropriate app store.

Ah. You have users DB represented by the phone number only, right? So you don't actually know which smartphone user has Android or iOS. In this case you should use a special universal url (sent in SMS) linked to special webpage on your server where with help of js you have to detect from which type of device this user viewing your page and simply redirect the user to corresponding market.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM