https://stackoverflow.com/questions/46099467/opening-location-settings-activity-from-chrome-on-android/46175726#46175726
Seems you can't open Location Settings directly from Android Intents with Chrome because Settings Activities didn't support BROWSABLE
category (for details take a look at this question of Dickeylth and answer of Rafal Malek). But You can 100% do this via custom android application and Deep Links to custom Activity with <category android:name="android.intent.category.BROWSABLE"/>
support, like in that tutorial.
In that case your application SettingsActivity
code should be like:
public class SettingsActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
startActivityForResult(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS), 0);
}
}
and AndroidManifest.xml
part for SettingsActivity
<activity android:name=".SettingsActivity">
<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:host="open.location.settings"
android:scheme="http"/>
</intent-filter>
</activity>
and, finally, "deep" link for SettingsActivity
in HTML file:
Seems, if you don't want to install app on user side, you can also do this in Instant Apps. Details for links to Instant App you can find here.