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
You can automatically restart your closed app Activity after a few
seconds using the OneShotAlarm approach described at
http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/app/
using a scheduled app (re)launch.
Regards
On Jan 8, 2:39 pm, "Evgeny V" wrote:
> Hi All,
>
Ok. Thanks!
WIl try it.
On Fri, Jan 9, 2009 at 1:18 PM, blindfold wrote:
>
> You can automatically restart your closed app Activity after a few
> seconds using the OneShotAlarm approach described at
>
>
> http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/app/
>
> using
Well, the problem is that when the program is killed, due to android
policies or because of an error, sometimes the program is restarted in
the last activity that was displayed. In my application, when this
happens, I have an error and the program is "force to close" because
I'm missing some data t
if you want to return to a particular activity when the application is
(re)launched you can specify that in the manifest
android:launchMode="singleTask"
android:alwaysRetainTaskState="true"
are two things worth reading about.
--
You received this message because you are subscribed to the Googl
> That depends on how the user "goes back to the application". If they
> click on the launcher icon, they will go to the launcher activity. If
> they navigated back to the destroyed activity via the BACK button or
> something like that, they will go to that specified activity.
This is not true for
mmm I think that you need to save all that data via shared preferences (or
something like that) when your app is about to be killed. You can check the
javadoc for Activity#onPause() and the Spinner sample that comes with the
SDK.
On Wed, Jul 20, 2011 at 10:56 AM, Fina Perez wrote:
> Well, the pr
Then you have a bug that needs to be fixed. Putting band-aids over
broken code is likely to make it only worse in the long run.
Try initializing your data on-demand, so it's available to any activity
that may need it.
FWIW, there a manifest flag that resets the stack to the main activity,
bu
That has nothing to do with what happens when the process is killed.
Processes being killed in the background is invisible to the user. The UI
flow they go through is absolutely not intended to change just based on
whether a process is killed, because it is basically random when that will
happen.
On Thu, Jul 21, 2011 at 4:12 PM, nadam wrote:
> This is not true for my devices. At least not after manually
> destroying an app using a task manager. I get the same behavior from
> launcher icon and back button. On HTC Hero with Android 2.1, I always
> end up in the launcher activity. On Nexus S
10 matches
Mail list logo