Same result: used: myIntent.setComponent(ComponentName.unflattenFromString(Name));
On Jul 10, 3:38 pm, Mark Murphy <mmur...@commonsware.com> wrote: > Try setComponent() instead of setPackage(). > > > > On Sat, Jul 10, 2010 at 6:28 PM, CMWiii <kentka...@gmail.com> wrote: > > > In a test app I pass an intent to resolveActivity to find out what is > > the > > best fit for the intent. > > > For example: > > > Intent myIntent = new Intent(); > > > myIntent.setPackage(PackageName); > > myIntent.addCategory(Intent.CATEGORY_LAUNCHER); > > myIntent.setAction(Intent.ACTION_MAIN); > > > PackageManager manager = getPackageManager(); > > > ResolveInfo ri = manager.resolveActivity(exceptionIntent,0); > > > if (ri != null) { > > Intent newIntent = new Intent(); > > > newIntent.setClassName(PackageName, > > ri.activityInfo.applicationInfo.className); > > newIntent.setFlags(ri.activityInfo.flags); > > > startActivity(newIntent); > > } > > > The result of all this is an error: > > "android.content.ActivityNotFoundException: Unable to find explicit > > activity > > class ......." > > > Any suggestions or thoughts on why I am getting back an activity that > > then can't be > > found by startActivity? > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6 > Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en