0

we have got problem with our android application. We want to determine if it will not crash when we go to another activity, but we do not want to go there, just check if it will be possible or not...

Thank you,

Roman Holic
  • 199
  • 9
  • "We want to determine if it will not crash when we go to another activity" so you want to predict the future? afaik it is not possible in the real life... – pskink Aug 07 '15 at 05:47
  • possible duplicate of [Determining if an Activity exists on the current device?](http://stackoverflow.com/questions/2878694/determining-if-an-activity-exists-on-the-current-device) – WeNeigh Aug 07 '15 at 05:49
  • let me update question :) i want to open activity but NOT OPEN like it will be visible, just something like open in iframe or only emulate open of that activity... – Roman Holic Aug 07 '15 at 05:49
  • Why do you want to do that? You could possibly finish the activity(which you want to test) in your onCreate or bring the old Activity back to foreground. – daemmie Aug 07 '15 at 05:50
  • imagine situation... i am in activity B and i want to go back to activity A, but after i go back to activity A it crash... I want to restart app when ii am in activity B, not after i go back to A :) so thats why i want some workaround to determine if activity A is working before i go there... – Roman Holic Aug 07 '15 at 05:56
  • tried `Thread#setUncaughtExceptionHandler` / `Thread#setDefaultUncaughtExceptionHandler` ? – pskink Aug 07 '15 at 06:02
  • You can check if an activity is running by using the ActivityManager. Also you can Intent Flag to force the Activity to be recreated. – daemmie Aug 07 '15 at 06:05
  • you could fix what's crashing, which would be a nicer approach. – CptEric Aug 07 '15 at 06:26

0 Answers0