Starting activity from packageinfo

Posted by Nyan Lynn Htun on Stack Overflow See other posts from Stack Overflow or by Nyan Lynn Htun
Published on 2010-02-20T03:13:25Z Indexed on 2010/03/20 17:51 UTC
Read the original article Hit count: 310

Filed under:

Is there a way run an intent from packageinfo? I've been searching and I don't find it.

I tried like that Intent i = new Intent(); i.setAction(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_LAUNCHER); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); i.setComponent(new ComponentName(p.applicationInfo.packageName,p.applicationInfo.name)); startActivity(i);

but it doesn't work because [p.applicationInfo.name] is always null.

© Stack Overflow or respective owner

Related posts about android-intent