question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

restartApplicationWithIntent() more than Home key

See original GitHub issue

me App crash,according to sample,do restartApplicationWithIntent() method.
Then, press Home key,perhaps repeat this operation.
App Stack no clean . if in LAUNCHER Activity onCreate() add following code,would not produce.
But I don’t know why.

 if (!isTaskRoot()) {
            finish();
            return;
  }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
zengcanxiangcommented, Jun 14, 2017

@Ereza Very sorry, did not respond to you in a timely manner, because the work led to a period of time did not come to pay attention to this problem.
the default error activityis also like this.
When I press the home button, did not return to the home page, but restarted. but file not upload… http://o6y6mbc2m.bkt.clouddn.com/深度录屏_选择区域_20170614145808.gif

0reactions
Erezacommented, Jun 23, 2017

Thanks for your feedback @zengcanxiang, I’ll make a new release of the library when I have some free time 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Force application to restart on first activity - Stack Overflow
Here is an example to restart your app in a generic way by using the PackageManager: Intent i = getBaseContext().getPackageManager() .
Read more >
Different Ways to Programmatically Restart an Android App on ...
Now the point that comes here is how we can Programmatically Restart an Android App on Button Click. So in this article, we...
Read more >
Handle configuration changes - Android Developers
When such a change occurs, Android restarts the running Activity ( onDestroy() is called, followed by onCreate() ). The restart behavior is ...
Read more >
Android launches second instance of root Activity instead of ...
App restarts. If repeat steps from that moment, it restarts once more. Then if you begin closing app, it closed so times so...
Read more >
Finding Resume and Restart Errors in Android Applications
the 'Home' button. When the app is stopped, the AF in- vokes onStop() rendering the activity invisible. When the app is restarted, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found