Camera and Photo Gallery


#1

I am running into a peculiar issue with my ionic app. The app is supposed to use the front/back camera and photo gallery to upload profile pic. If i open the camera from the app and on taking a picture it doesn’t return back to the app screen instead it goes to android phone home screen. Same behavior observed with opening the gallery app and selecting the app. Also notice the same issue if press back button to return back to app screen from Camera/ Gallery.

Any pointers what might be going wrong. Running the app on Note 3 Android version 5

Advance Thanks


#2

It depends how android manageprocesses.

If the camera opens the system tries to get free mem for that… and closes other process.
But sadly this is often the own cordova app.

We have found out that on many android devices this does not happen, but on my motoG(2) the problem occurs very often.

Maybe someone else has deeper experiences with that?

I played around how the app-instances are handled adding something like this to the config.xml

other options:
“standard”
“singleTop”
“singleTask”
"singleInstance

But there are too many sideeffects… so i decided to leave it standard.


#3

Might be helpful to someone. If “Developer Options” (in general settings) is turned off it works fine as expected.


#4

yeah but that does not help for production apps?


#5

I agree, trying hard to get to the root cause.


#6

Did anyone solve the issue? We face the same in our photo based q&a app and its the only showstopper for going live.


#7

maybe you can check java err output
adb logcat | grep - i ‘System.err’