Hi All,

Any ideas how to restart the app from itself?
I'm trying following code but failed with null pointer exception. Where is
my fault?
public void Restart()
{
newIntent.setClassName("mypackage.name", "MyMainClass");
newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
app.startActivity(newIntent);
finish();
}
Thanks

On Tue, Jan 6, 2009 at 5:34 PM, goldfish <courtingthegoldf...@gmail.com>wrote:

>
> I need to restart my application after a user changes some
> preferences. I want to restart my application as if the user hit home
> and relaunched my application. Does anyone know how to do this?
> >
>

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