I am using Cubic to implement 'Add to home'
functionality. What I want to know is how can I detect if my application is launched from the icon created by 'add to home' or from any browser.
I want this check basically on iPad. Usually there are 3 ways my users access my app on iPad:
- Shortcut on home (created by add to home)
- Google Chrome
- Safari
I could detect the 2nd and 3rd. But I couldn't detect the 1st one.
This is how I check if the user is using iPad:
var isiPad = navigator.userAgent.match(/iPad/i) != null;
if(isiPad){
/* do something */
}
This is how I check if the user is using Google Chrome on iPad:
if(navigator.userAgent.match('CriOS')){
/* do something */
}
Thanks in advance for any help.