Skip to Content
avatar image
Former Member

cordova camera plugin not responding from SAP Fiori Client

Hello Experts,

We have developed a UI5 application by using cordova camera plugin as below:

capturePhoto: function(){

var oNav = navigator.camera;

oNav.getPicture(this.onPhotoSuccess, this.onFail,

{

quality: 10,

destinationType: oNav.DestinationType.DATA_URL,

saveToPhotoAlbum; true

}

},

onPhotoSuccess: function(imageData){

var oImage = this.getView().byId("myImage");

oImage.setSrc("data:image/jpeg;base64", imageData);

}

When the application is accessing from SAP Fiori Client, the Camera API is not responding in Android device. Please suggest.

Thanks,

Padmindra

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 11, 2017 at 09:28 AM

    Check out this resource by Cordova: Android Life Cycle. Basically your application life cycle in Android is terminating the app when a new intent for camera activity is triggered. This means the app is basically shut down by the Android OS, rather than pausing the activity in the background.

    The above guide provides a solution where you can save the state of the application before navigating to the camera activity. See if it works.

    Add comment
    10|10000 characters needed characters exceeded