Camera App crashing in Samsung Galaxy s4

Getting Crash with Samsung Galaxy s4 when using camera or gallery. below using option:

var options = {
            destinationType: Camera.DestinationType.DATA_URL,
            sourceType: sourceType,
            encodingType: Camera.EncodingType.PNG,
            saveToPhotoAlbum: false,
            targetWidth: 250,
            quality : 50,
            correctOrientation:true
          };

Working good with other devices.

What is the reason for the crash? Did you look into the logfile?

i try to debug using google chrome console, and android studio but there no error shows while crash. But the heap memory almost filled 100% when tracking android studio. this happening with Galaxy s4 but working on other devices.

Do i need to do additional debug ? how to do that ?

when i launch camera in app, capture pic and press ok to go back to app, app get restart.

I got this mostly on my motorola G1/2. If you are using Cordova Camera plugin android thinks you start a new app and closes other apps to free memory.
But this happens not always. Sometimes it worked and other times not.

So i did not found out the problem for those (some time ago).
Does it work on other Android Phones (newer ones) or with iOS.

Yes it is working fine with iPhone and other android phone like Asus,
Coolpad, Samsung latest phones, MI phone i did test. Using Cordova camera
plugin.

Also ng-maxlength not working with Galaxy s4.

Regards
Sohan Yadav

Any Suggestions or Help ?

Not really.

  • Google for the plugin you are using and problems with this specific device.
  • Create a new app that only does the stuff that is crashing now and see if it also crashes
  • If it doesn’t find out why.
  • If it still does: Is this plugin available in Ionic View? If so test this new minimal app in Ionic View

Hope this will help to understand issue to peoples and how they can try to get it resolve. this is because of memory https://issues.apache.org/jira/browse/CB-12676