1

I have fatal crash in third party library which use JNI. I want to do auto restart application fall. How do I programmatically restart an Android App ? I have tried to create background service monitoring app health and trying to start the app. However, as of Android 11 Google has restricted doing that: https://developer.android.com/guide/components/activities/background-starts

  • Does this answer your question? [android: Handle Application Crash and start a particular Activity](https://stackoverflow.com/questions/27829955/android-handle-application-crash-and-start-a-particular-activity) – Armaggheddon Aug 20 '21 at 12:56
  • It works only for Java Exception. If cpp code throw exception Thread.setDefaultUncaughtExceptionHandler doesn't catch and app fall. – Volodymyr Olyinyk Aug 20 '21 at 13:03

1 Answers1

2

I cannot comment due to low reputation points :( so i am writing here.
You might check this other question on how to catch the exception generated in your c++ code from @kosev at this link Catch exception in Android NDK C++ code


You should change the question title to include the fact that wou want to catch the exception raised from c++ code and not Java/Kotlin code.

Armaggheddon
  • 340
  • 1
  • 10