9

Switching between apps in Android

view full story
linux-howto

http://stackoverflow.com – I am making an app that needs to be able to switch between apps that the user has open (eg, the apps in the multitasking menu) I have got the ComponentName of the 10 most recent apps, and can launch them (ie, switch to them) like this: intent = new Intent(); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setComponent(info); startActivity(intent); However, when I try and change to Facebook (And probably some similar apps) it requests a specific permission: java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.facebook.katana/.activity.FbFragmentChr (HowTos)