Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'll go with the short answer stated before: No.</p> <p>Android Browsers won't let any website access information about the INTENT used to open the browser or other stuff due to JS security constraints.</p> <p>But... wait... there is a way to bind JavaScript on a Website to Android code (<a href="http://developer.android.com/guide/webapps/webview.html#BindingJavaScript" rel="nofollow">http://developer.android.com/guide/webapps/webview.html#BindingJavaScript</a>), so what I would do, given that the website is already developed, is to develop a simple Android App with a nice icon and a <a href="http://developer.android.com/guide/webapps/webview.html" rel="nofollow">WebView</a> with JS enabled and pointing to the Website, so it serves as a client or wrapper App to let's say... "<a href="http://thewebsite.com?client=android" rel="nofollow">http://thewebsite.com?client=android</a>". On the WebView, you can block navigation to other sites, so the user can't go anywhere else, user will have to use your site navigation. Then you can bind Android code to JavaScript as mentioned above to expose methods from the Android environment to the JavaScript in your Website.</p> <p>Instead of letting people add a shortcut to your Website, give them a link to download your little wrapper App from the Google Play Store. That way, you'll know who is using your Website/WebApp from Android devices, and since you own the App, you can access the INTENT and know Android OS information, and get more stuff about the device from the JS in your site than the UserAgent would give you, like to know if there is an active network connection on the client, etc.</p> <p>Good luck!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload