Nice, thanks!

On 11 mrt, 19:14, Dianne Hackborn <[email protected]> wrote:
> Query the package manager for all home activities, and pick the one that has
> the SYSTEM flag set.
>
>
>
>
>
> On Wed, Mar 11, 2009 at 6:26 AM, MrSnowflake <[email protected]> wrote:
>
> > But using CATEGORY_HOME won't solve his problem.
>
> > On 10 mrt, 19:41, Romain Guy <[email protected]> wrote:
> > > Don't use the package and class name directly, this will work only for
> > > the current default Home screen. Use an Intent with the CATEGORY_HOME
> > > instead.
>
> > > On Tue, Mar 10, 2009 at 11:40 AM, MrSnowflake <[email protected]>
> > wrote:
>
> > > > As I said on Anddev.org earlier:
> > > > Intent myIntent = new Intent();
> > > > myIntent.setClassName("com.android.launcher",
> > > > "com.android.launcher.Launcher");
> > > > startActivity(myIntent);
>
> > > > On 10 mrt, 14:18, Stoyan Damov <[email protected]> wrote:
> > > >> I can't help you with this. Tough luck - I'd assume that when an
> > > >> intent has alternative intent filters and an intent filter crashes,
> > > >> the user would be presented with the list of intent filters to retry
> > > >> the operation. I guess that's not the case or you wouldn't be asking.
>
> > > >> Cheers
>
> > > >> On Tue, Mar 10, 2009 at 2:59 PM, Kakyoin <[email protected]> wrote:
>
> > > >> > On Mar 10, 7:31 pm, Stoyan Damov <[email protected]> wrote:
> > > >> >> "Here are some examples of other operations you can specify as
> > intents
> > > >> >> using these additional parameters:
>
> > > >> >>     *
>
> > > >> >>       ACTION_MAIN with category CATEGORY_HOME -- Launch the home
> > screen."
>
> > > >> >>http://developer.android.com/reference/android/content/Intent.html
>
> > > >> >> On Tue, Mar 10, 2009 at 2:20 PM, Kakyoin <[email protected]>
> > wrote:
>
> > > >> >> > Topic.  Short and sweet question. And I did browse the forum
> > before
> > > >> >> > asking.
>
> > > >> >> > Thank you in advance.
>
> > > >> > Hi. Thank you for the reply.
>
> > > >> > But actually I do have another Alternative Home application (which I
> > > >> > set to default for CATEGORY_HOME).
>
> > > >> > In this case, let's assume that this Alternative Home has a but in
> > its
> > > >> > onCreate(), this bug cause the "Force close" screen.
>
> > > >> > The real problem is: when user set my Alternative Home as their
> > > >> > 'default action for 'Home' ', then shutdown the device and turn it
> > > >> > back on. It'll keep crashing at the start up.
>
> > > >> > The user can't press back to go to system's Home app; there's no
> > > >> > system's Home to go back to (because my Alternative Home is the
> > > >> > default and is the only 'Home'  loaded at boot time)
>
> > > >> > I'm sorry for my bad English. >_<  What I'm trying to do is to
> > handle
> > > >> > that bug(which actually only happen when user has no SD card
> > present)
> > > >> > by doing this: "if there's no SD card inserted, then just launch the
> > > >> > System's Home app instead"
>
> > > >> > here's my code when the SD card is not found:
>
> > > >> > Intent i = new Intent();
> > > >> > i.setAction("android.intent.action.MAIN");
> > > >> > i.addCategory("android.intent.category.HOME");
> > > >> > startActivity(i); // this launch my Alternative Home (because it is
> > > >> > set as default)
>
> > > >> > Anyway, Thank you for your reply. =)
>
> > > --
> > > Romain Guy
> > > Android framework engineer
> > > [email protected]
>
> > > Note: please don't send private questions to me, as I don't have time
> > > to provide private support.  All such questions should be posted on
> > > public forums, where I and others can see and answer them
>
> --
> 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.  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
-~----------~----~----~----~------~----~------~--~---

Reply via email to