"name" was just chosen for the psuedo code.  It is a component name of
the form" packagename/classname",
hence the unflatten.

On Jul 10, 5:24 pm, Dianne Hackborn <hack...@android.com> wrote:
> What is "Name"?
>
> ComponentName has a constructor that takes a package name and class name; in
> the activity info these are .packageName and .name.
>
>
>
> On Sat, Jul 10, 2010 at 3:52 PM, CMWiii <kentka...@gmail.com> wrote:
> > 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<android-developers%2bunsubscr...@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<android-developers%2bunsubscr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> 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 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

Reply via email to