Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (20 sloc) 667 Bytes

帮 @moziqi 查的, 自己备一份.

Intent intent = new Intent();
intent.setComponent(new ComponentName(
    "com.android.settings", 
    "com.android.settings.Settings$DataUsageSummaryActivity"));
startActivity(intent);
PackageManager packman = getPackageManager();
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
String pack = intent.resolveActivity(packman).getPackageName();
Log.e("Name", pack);

Intent launchIntent = getPackageManager().getLaunchIntentForPackage(pack);

if (launchIntent != null) {
    startActivity(launchIntent);
} else {
    Toast.makeText(this, "Package not found", Toast.LENGTH_SHORT).show();
}