I am trying to open a specific Settings page in a Chromebook using my Android app (Settings -> Device -> Storage Management -> External storage preferences).
My app reads/writes the USB drive, and I need to ensure that this is enabled. If this is enabled, everything works great, but I need an easy way to point the user to this setting.
If I open chrome://os-settings/storage/externalStoragePreferences in a Chrome browser it takes me to the correct setting.
I've tried using opening in a browser using:
val uri = Uri.parse("http://chrome://ossettings/storage/externalStoragePreferences")
val browserIntent = Intent(Intent.ACTION_VIEW, uri)
startActivity(browserIntent)
This gives a 'site can't be reached' error.
If I try without http - just using chrome://ossettings/storage/externalStoragePreferences as the uri, I get the following error:
java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW dat=chrome://os-settings/storage/externalStoragePreferences cmp=org.chromium.arc.intent_helper/.OpenChromeMultideviceSettingsActivity } from ProcessRecord{cc19980 19710:com.simplifieditproducts.picturekeeperconnect/u0a69} (pid=19710, uid=10069) requires com.google.android.apps.multidevice.client.permission.INITIALIZE_SCAN
This is my first time working with Chrome OS, and there doesn't seem to be a lot of documentation available. Any help would greatly be appreciated!