androidandroid-webviewandroid-5.0-lollipopandroid-webserviceandroid-5.1.1-lollipop

Invoke android settings from web page URL?


From Web application that consists of only web pages. In that, I need to open android settings activity. How to invoke it?


Solution

  • You cannot invoke Android Settings from web unless you have app which handle custom uri scheme.

    to invoke application in android from Webpage there needs to be app which handles call from particular Uri Scheme in android app on android device.

    you can create android app which handle custom uri scheme like below for activity to be invoked when url is visited in browser.

    <activity android:name=".MyUriActivity">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="myapp" android:host="path" />
        </intent-filter>
    </activity>
    

    myapp://opensettings

    if application is exist on android device which handle above uri scheme then you can call setting dialog from your android app after user redirect to myapp://opensettings url in browser.