How do I redirect a desktop call to action that goes to Appstore or Google Play depending on user's device? - html

How do I create a desktop call to action that goes to either (Apple) Appstore or (Android) Google Play depending on the end-user's needs?
I know we can create multi-link QR codes for mobile but is there anything similar for the desktop?

The functionality you're looking for can reside at the URL in the QR code. The embedded URL could link to a webpage that checks user agents and redirects appropriately. If the Safari on iOS user agent is detected, redirect to Apple's App Store. An Android user agent would be redirected to an appropriate app store. I would set all other user agents to go to a product page with links to both stores.
This could be a nice example!

Related

Progressive Web App (PWA) redirect page into standalone mode

I have PWA and I can run it as standalone (if user clicks icon on a device) or I can run as normal website (if user enter URL directly into web browser).
Is it possible to redirect page (open as standalone) if user open it as non standalone?
My manifest file already contain standalone parameter:
"display": "standalone"
I need something to start with.
As far as I know you need to "install" the pwa on the user device first.
By clicking the icon on the device (meaning you already installed the app there) you open the PWA that will be rendered as described in the web manifest (standalone in your case).
If you wouldn't have already installed the pwa on the device, you would have the same behaviour you are getting on your desktop by accessing the web site with the browser.
Let me know if I misunderstood your question.
UPDATE
The answer to your question (in the comment) is no (from a desktop browser). Chrome on an Android device uses/opens directly the PWA version, if installed of course. This is due to the Android Intent Filters that enable this.
But this is not the case from a desktop browser, where the user accesses the web site by entering the url manually. Maybe in the future it might change, but at the moment it is not possible.
In Chrome on desktop, if the PWA is installed and the user opens the app in the browser, there's a "To open this link, choose an app" link at top right on the address bar, between the password manager key and the bookmarks star - you could point that out to the user. Clicking that link offers a button to open the PWA and close the browser tab.

What URL to use for Facebook

I have created a Facebook canvas app, and I have set the web and mobile URLs in the app settings accordingly.
I want the user to select on 1 link, and if they are on a mobile to be taken to the website itself, but desktop users be directed to the app within Facebook.
What I am having trouble finding is; what URL I should be posting to my Facebook followers as a status? I'm not sure what URL utilisises the mobile URL setting.
Can anyone tell me what I should be using?

HTML5 mobile web app camera access

I am developing web application for mobiles for iOS and Android. As per requirements, I need to access mobile camera and take photos (more than one).
Then the photos should be stored in localStorage and then uploaded when user clicks on upload.
I am developing a web apps. It is not native app. I dont want to use phonegap or similar to phonegap.
It should be like normal button. not like choose file button.
have a read: here but it will not be supported on all devices.

Open link in mobile browser(safari) instead of Facebook native browser (html base)

Im developing a web with facebook share link function. I notice facebook mobile apps will open shared link in its own browser, instead of mobile broswer (IE. safari, chrome and so on). Is there any control on this able us to force facebook open the link in mobile browser?
No. The only reliable workaround is if you use the web app with an iOS app, and all users install that iOS app, you can send users to your iOS app to accomplish that task which isn't a great workaround.
An easier but still not optimal solution would be to detect the Facebook browser in the user-agent string, and display a message to prompt users to visit the URL in the mobile browser.

URL to open iOS app in App Store web page and iTunes app simultaneously

What is the preferred URL to use to open an iOS app in it's App Store web page as well as the iTunes app (when available on the host device)?
I've tried using the itms:// protocol but this opens the app details in the iTunes app only and so is of no use when the URL is navigated to from an Android or Windows phone for example.
I believe you would want to look at the browser to determine which link to use. If the browser is Safari on iOS device, give them the iTunes protocol link, otherwise, http://.
I believe javascript allows you to read such information: Take a look here: http://www.w3schools.com/js/js_browser.asp
I've discovered that the behaviour of a URL opening an iTunes preview web page before automatically opening the iTunes app on the host device (where available) is triggered by affiliate links (which need to track the click before taking the user to the intended destination).