Intent To Hidden Application On Android
I have two application. I want to intent to the second one from the first one. But the second application must be launched from first one. So i have to hide the second one's icon.
Solution 1:
ComponentName lComponentName= new ComponentName(yourPackageNameOFApplication2, yourPackageNameOFApplication2.YourMainActivityOfApplication2);
try {
Intent i = new Intent(Intent.ACTION_MAIN);
i.setComponent(lComponentName);
i.addCategory(Intent.CATEGORY_LAUNCHER);
startActivity(i);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
// Write Toast , we will have an exception if the second application is not installed
}
Post a Comment for "Intent To Hidden Application On Android"