Hi, the code I have paste is an example, I am the developer of Apps Organizer show all installed apps and allow to launch each application. Some apps cannot be launched, often (but not always) the missing Permission is internet permission but I don't want to add this permission to my app. I have noticed that the same app cannot be launched with other apps (for example App Manager). So, isn't there a mistake in my code? The problem is in manifest of the called app? Many thanks, Fabio
On 1 Dic, 23:30, Dianne Hackborn <[email protected]> wrote: > It looks like for some reason their manifest has declared that you need the > internet permission to be able to start it. This is probably a mistake in > their app, but it turns out this permission is one any app can have so you > -could- request it. > > Because the exception you are showing does not match the code you are > showing (they are different apps), it is hard to give you much advice. To > realize, though, that except for the main activity everything else in the > app could be made private to the app, so you simply can't access it. You > just should not be poking directly at apps like that, unless the developer > has published some supported way to do so or otherwise deliberately made > parts of their app available through intent protocols or other means. > > > > > > On Tue, Dec 1, 2009 at 10:36 AM, Fabio <[email protected]> wrote: > > Hi, I have a problem when I call startActivity with some apps. This is > > the exception: > > > java.lang.SecurityException: Permission Denial: starting Intent > > { action=android.intent.action.MAIN categories= > > {android.intent.category.LAUNCHER} flags=0x10000000 comp= > > {com.acquamedia.widget.translator/ > > com.acquamedia.widget.translator.TranslatorWidget} } from ProcessRecord > > {43920440 1361:com.google.code.appsorganizer/10067} (pid=1361, > > uid=10067) requires android.permission.INTERNET > > at android.os.Parcel.readException(Parcel.java:1234) > > at android.os.Parcel.readException(Parcel.java:1222) > > at android.app.ActivityManagerProxy.startActivity > > (ActivityManagerNative.java:1046) > > at android.app.Instrumentation.execStartActivity(Instrumentation.java: > > 1494) > > at android.app.Activity.startActivityForResult(Activity.java:2669) > > at android.app.Activity.startActivity(Activity.java:2713) > > > My app don't have the Internet Permission but I want to launch apps > > with this permission. > > > For example I get this exception launching Mafia Lite with a code like > > this: > > > public class MainActivity extends Activity { > > �...@override > > public void onCreate(Bundle savedInstanceState) { > > super.onCreate(savedInstanceState); > > try { > > String packageName = "mafia.free2.com"; > > String name = "mafia.free2.com.MafiaLife"; > > Intent intent = new Intent(Intent.ACTION_MAIN); > > intent.addCategory(Intent.CATEGORY_LAUNCHER); > > > intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); > > intent.setClassName(packageName, name); > > intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > > startActivity(intent); > > } catch (Throwable t) { > > t.printStackTrace(); > > } > > } > > } > > > Someone have resolved this issue? > > Many thanks, Fabio > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<android-developers%2Bunsubs > > [email protected]> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

