Camera App crashing in Samsung Galaxy s4


#1

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.


#2

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


#3

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 ?


#4

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


#5

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.


#6

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


#7

Any Suggestions or Help ?


#8

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

#9

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