Skip to main content
added 313 characters in body
Source Link

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:

  1. Shortcut on home (created by add to home)
  2. Google Chrome
  3. 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.

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:

  1. Shortcut on home (created by add to home)
  2. Google Chrome
  3. Safari

I could detect the 2nd and 3rd. But I couldn't detect the 1st one.

Thanks in advance for any help.

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:

  1. Shortcut on home (created by add to home)
  2. Google Chrome
  3. 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.

I'mI am using Cubic to implement 'Add to home' functionality. What I want to know is how can I detect if themy application wasis launched from the icon created by 'add to home' or from any browser.

This is a check I want this check basically on iPad. Usually there are 3 ways my users access my app on iPad:

  1. Shortcut on home (created by add to home)
  2. Google Chrome
  3. Safari

I know how tocould detect the 2nd and 3rd. But I need to know how tocouldn't detect the 1st one.

Thanks in advance for any help.

I'm using Cubic to implement 'Add to home' functionality. What I want to know is how can I detect if the application was launched from the icon created by 'add to home' or from any browser.

This is a check I want basically on iPad. Usually there are 3 ways my users access my app on iPad:

  1. Shortcut on home (created by add to home)
  2. Google Chrome
  3. Safari

I know how to detect the 2nd and 3rd. But I need to know how to detect the 1st.

Thanks in advance for any help.

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:

  1. Shortcut on home (created by add to home)
  2. Google Chrome
  3. Safari

I could detect the 2nd and 3rd. But I couldn't detect the 1st one.

Thanks in advance for any help.

Source Link

Detect if App is launched from Add to Home icon

I'm using Cubic to implement 'Add to home' functionality. What I want to know is how can I detect if the application was launched from the icon created by 'add to home' or from any browser.

This is a check I want basically on iPad. Usually there are 3 ways my users access my app on iPad:

  1. Shortcut on home (created by add to home)
  2. Google Chrome
  3. Safari

I know how to detect the 2nd and 3rd. But I need to know how to detect the 1st.

Thanks in advance for any help.