Opening the Android USB Settings menu with an intent -
i want open "usb computer connection" settings menu within android app. looking @ logcat output app this, found want can done adb shell
am start -n com.android.settings/.usbsettings
how do same thing within android app? know can things
startactivity(new intent(settings.whatever));
but there isn't "whatever" usb settings menu.
the solution ended being use explicit intent:
intent intent = new intent(); intent.setcomponent(new componentname("com.android.settings", "com.android.settings.usbsettings")); startactivity(intent);
Comments
Post a Comment