Search code examples
c#androidhttp-redirectwindows-mobilemobile-safari

Redirecting to device settings


Say I have a mobile optimized website which runs with a lot of javascript on it to create awesome effects, and a user enters the website via a mobile browser which doesn't have javascript activated.

Is it then possible to (through a button click) redirect that user to his/hers browser settings?

You need to have JavaScript activated in order to browse this site properly.
Click here to change your settings


Solution

  • In principle, you can create an intent: URL that references an ACTION_SETTINGS Intent, though I have not tried this. Off the top of my head, the simplest way to construct that URL is to generate a scrap Android project and call:

    Log.d("Something", new Intent(android.provider.Settings.ACTION_SETTINGS).toUri(Intent.URI_INTENT_SCHEME));
    

    then check LogCat for the URL that you would put in the Web site. Of course, this URL will only work on Android devices.