首页 > 代码库 > start com.android.settings/com.android.settings.SubSettings activity
start com.android.settings/com.android.settings.SubSettings activity
1. get class name:
adb shell
shell@android:/mnt/sdcard/books $ dumpsys window windows >dump.txt
grep "focus"
mFocusedApp=AppWindowToken{420a5df8 token=Token{420a5c00 ActivityRecord{420a5ac8 com.android.settings/.SubSettings}}}
mInputMethodTarget=Window{420fc320 com.android.settings/com.android.settings.SubSettings paused=false}
or
adb shell "dumpsys window windows | grep -E ‘mCurrentFocus|mFocusedApp‘"
http://stackoverflow.com/questions/11201659/whats-android-adb-shell-dumpsys-tool-and-its-benefits
http://www.cnblogs.com/jiangz/p/3330245.html
2. start activity
Intent intent=new Intent("/");
ComponentName cn=new ComponentName("com.android.settings", "com.android.settings.profile.ProfileSettings");
// ComponentName cn=new ComponentName("com.android.settings", ".profile.ProfileSettings");
intent.setComponent(cn);
startActivityForResult(intent, 1);
start com.android.settings/com.android.settings.SubSettings activity