0

I have an activity to call system camera to take photo and returned the photo. But sometimes the activity is not restored. I printed the log and found that the onPause() was called but onSaveInstanceState() and onStop() were not called after calling system camera. I suspend my activity is killed by system because of low memory. But the onSaveInstanceState() should be called if system kills the activity, isn't it?

Does any reasons cause that onSaveInstanceState() not be called? Does anyone has workaround about this problem? I have no idea about this so come here.

Zachary
  • 127
  • 1
  • 2
  • 15

1 Answers1

0

I know that the android camera (the garbage collector) 'kills' other applications in case there is not enough memory. Even activities in the background, and even the activity that started the camera!

Might have to do with your problem?

see Phonegap camera android kills cordova and PhoneGap camera restarts the application

this might be heandy: http://developer.android.com/reference/android/app/Activity.html Can you check onDestroy() ... not sure you can do anything with this..

Community
  • 1
  • 1
michel.iamit
  • 5,788
  • 9
  • 55
  • 74