Ah. Try using queryIntentActivities() instead of resolveActivity(), then.

On Tue, Aug 10, 2010 at 2:47 AM, manoj <manojkumar.m...@gmail.com> wrote:
> I am getting the correct result if I have the only one home app
> (default home) is installed. If i have more than 1 home apps, I am
> getting the result w.r.t ResolveActivity. Now how can I resolve this?
>
> say, for example,
> 1. Android Home (action=MAIN, cat=LAUNCHER,HOME...etc).
> 2. MyHome(action=MAIN, cat = LAUNCHER,HOME...etc).
>
> current home set is MyHome.
>
> Now If I follow the above code, the result displayed is
> ResolverActivity. Now how can I resolve this.
>
> Thanks,
> Manoj.
>
> manoj wrote:
>> I mean the package name of the launcher. finally got it.
>>
>> ActivityInfo ai = ri.activityInfo;
>> ai.packageName will give the package name.
>>
>> Thanks for the help.
>>
>> On Aug 8, 7:11 pm, Mark Murphy <mmur...@commonsware.com> wrote:
>> > Please define "didn't get the result".
>> >
>> >
>> >
>> >
>> >
>> > On Sun, Aug 8, 2010 at 9:57 AM, manoj <manojkumar.m...@gmail.com> wrote:
>> > > Hi Mark,
>> >
>> > > could you please alobrate it? I have used the following code. but
>> > > didn't get the result.
>> >
>> > > Intent i = new Intent();
>> > >        i.setAction(Intent.ACTION_MAIN);
>> > >        i.addCategory(Intent.CATEGORY_HOME);
>> > >        PackageManager pm = this.getPackageManager();
>> > >        ResolveInfo ri = pm.resolveActivity(i, 0);
>> > >        System.out.print("HOME PKG NAME + "+ri.resolvePackageName);
>> >
>> > > Could you please tell me?
>> >
>> > > On Aug 7, 10:22 pm, Mark Murphy <mmur...@commonsware.com> wrote:
>> > >> Create an Intent that brings up the HOME screen, then use
>> > >> PackageManager and resolveActivity().
>> >
>> > >> On Sat, Aug 7, 2010 at 9:40 AM, manoj <manojkumar.m...@gmail.com> wrote:
>> > >> > Hi all,
>> >
>> > >> > I have a some strange issue. I would like to get the package name of
>> > >> > the current home screen.
>> >
>> > >> > lets say we have two home screens : 1. default android home theme
>> > >> >                                                       2. 3rd party
>> > >> > home theme.
>> >
>> > >> > Assume both are installed and current home theme is 3rd party home
>> > >> > theme.
>> >
>> > >> > Now I would like to get the package package name of the current home
>> > >> > theme (3rd party). Is there any api which can give the current home
>> > >> > screen package name?
>> >
>> > >> > I can get the package name in ddms. But I want it programmatically.
>> >
>> > >> > Regards,
>> > >> > Manoj.
>> >
>> > >> > --
>> > >> > 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.9
>> > >> Available!- Hide quoted text -
>> >
>> > >> - Show quoted text -
>> >
>> > > --
>> > > 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 Android Development_ Version 3.1 Available!- 
>> > Hide quoted text -
>> >
>> > - Show quoted text -
>
> --
> 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/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
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