In my class, the camera will be open and the program will display a bitmap after the user takes a picture from the phoneβs camera, but at the same time, the user rotates the screen to "landscape", the bitmap will disappear, and oncreate () activity will load again and then the camera will open again.
I did not know whether to save the bitmap with onRetainNonConfigurationInstance () or onSaveInstanceState ().
The question is, how can I save a bitmap (taken from a telephone camera) before the user rotates the phone, so that even if the phone is landscape mode, the same bitmap will be displayed on the screen?
--- EDIT --- Adding to AndroidManifest.xml - a good way to get save state?
source share