I am trying to make a simple application which will send the user to a specific (system installed) app (system settings, calendar, browser, etc.) when clicked by the user fr
In this example you can open system alarm clock app., hope it helps, example activity:
public class TestActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PackageManager packageManager = this.getPackageManager();
if (packageManager != null) {
Intent AlarmClockIntent =
new Intent(Intent.ACTION_MAIN).addCategory(
Intent.CATEGORY_LAUNCHER).setComponent(
new ComponentName("com.android.deskclock", "com.android.deskclock.DeskClock"));
ResolveInfo resolved = packageManager.resolveActivity(AlarmClockIntent, PackageManager.MATCH_DEFAULT_ONLY);
if (resolved != null) {
startActivity(AlarmClockIntent);
finish();
return;
} else {
// required activity can not be located!
}
}
}
}