How to explicitly launch the system's Home application by code?

by Kakyoin » Tue, 10 Mar 2009 20:21:05 GMT


Sponsored Links
 Topic.  Short and sweet question. And I did browse the forum before
asking.

Thank you in advance.
--~--~---------~--~----~------------~-------~--~----~



How to explicitly launch the system's Home application by code?

by Kakyoin » Tue, 10 Mar 2009 20:59:41 GMT


 




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. =)
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to explicitly launch the system's Home application by code?

by MrSnowflake » Wed, 11 Mar 2009 02:40:23 GMT


 As I said on Anddev.org earlier:
Intent myIntent = new Intent();
myIntent.setClassName("com.android.launcher",
"com.android.launcher.Launcher");
startActivity(myIntent);






--~--~---------~--~----~------------~-------~--~----~



How to explicitly launch the system's Home application by code?

by MrSnowflake » Wed, 11 Mar 2009 02:41:35 GMT


 I have to say, I don't think this method will keep working in future
versions as the package and class name of the launcher might change!







--~--~---------~--~----~------------~-------~--~----~



How to explicitly launch the system's Home application by code?

by Kakyoin » Wed, 11 Mar 2009 13:53:48 GMT


 Hi. Thank you all for the answers.

Launching by class name was very helpful for now but following your
advice, I'll not use that method. >_<


--~--~---------~--~----~------------~-------~--~----~



How to explicitly launch the system's Home application by code?

by MrSnowflake » Wed, 11 Mar 2009 21:26:49 GMT


 ut using CATEGORY_HOME won't solve his problem.

On 10 mrt, 19:41, Romain Guy <romain...@google.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



How to explicitly launch the system's Home application by code?

by MrSnowflake » Thu, 12 Mar 2009 05:22:14 GMT


 ice, thanks!

On 11 mrt, 19:14, Dianne Hackborn <hack...@android.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Device Idle State Capture

Hi All:

Is it possible to somehow detect and capture the idle state of the
android device?
Need help on the approach which should be followed for developing idle
time based applications in android?

Thanks,
Pooja
--~--~---------~--~----~------------~-------~--~----~

2. Future supported screen sizes and resolutions

Hi,

I'd love to get some information about the screen sizes Android is
planning to support in future, and what that might look like.  I'm
particularly interested in larger screens, like 8"-10" WVGA.

I see the roadmap says:

      Beyond Q1 2009 ... Support for WVGA and QVGA

but what kind of support is that?  If this is still phone-oriented,
then I might expect support for 3"-4" WVGA, with the existing UI -- so
the contacts list, for example, would still be a single column.  My
project is for a system with a larger screen, about 8"-10", and it
really needs a different UI layout to look good -- the contacts list
with one column but two rows per entry looks poor in the wide screen.
A two-column view would be much better.  Also more items per screen,
as my touch area is much larger.

So:

* Will Android support this?  IOW will the standard apps have layouts
tailored to this kind of screen?
* Roughly when would that be?

Cheers,

John

--~--~---------~--~----~------------~-------~--~----~

3. How to Get PendingIntent Result Code?

4. Audio in the emulator...

5. Profiling Android Libraries

6. HELP: How to Packaging a Database in an App

7. Android Patches Mechanism