Skip to Content
0

cordova camera plugin not responding from SAP Fiori Client

Mar 31, 2017 at 10:08 AM

140

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Parth Shah Apr 11, 2017 at 09:28 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded