Reputation: 5792
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.
Upvotes: 0
Views: 3240
Reputation: 6571
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, most probably shortened) linked to a special webpage on your server with special js (JavaScript, web devs should help on this) intergated. This script should detect which type of device user is using while viewing a webpage and simply redirect to the corresponding market. Also you could provide just both app market links on your page so it will be up to user to choose - in this case no js needed, it could be a very simple html page.
Upvotes: 5