Reference:
https://blog.csdn.net/shaw1994/article/details/39642473https://dotblogs.com.tw/neil/2011/08/12/33058/
Code snippet:
public void switchToApp(String packageName) { Intent appIntent = getPackageManager().getLaunchIntentForPackage(packageName); if(appIntent != null){ startActivity(appIntent); } }