cancel
Showing results for 
Search instead for 
Did you mean: 

Example to implement barcode scanner functionality in sap.m

Former Member
0 Kudos

Example to implement barcode scanner functionality in sap.m

Accepted Solutions (0)

Answers (1)

Answers (1)

midhun_vp
Active Contributor
0 Kudos

Hi Ramesh,

You could have a look at this blog :http://scn.sap.com/docs/DOC-56113

Please provide information on what you are trying to do and what are the steps you followed.

Regards,Midhun

SAP Technology RIG

Former Member
0 Kudos

Hi Midhun,

Actually my requirement is like i developed sap.m application, in that application i need to implement the barcode scanning functionality using android mobile, i tried your example index.html,index2.html both are getting error message

TypeError: cordova is undefined

cordova.plugins.barcodeScanner.scan(scanSuccessCallback, scanErrorCallback);

i added the cordova.js also but till the error is coming.

midhun_vp
Active Contributor
0 Kudos

Hi Ramesh,

You need to add the plugins to the project (cordova -d plugin add com.sap.mp.cordova.plugins.barcodescanner ). Follow all the steps mentioned in that blog. To execute cordova commands you need to install cordova in your system.

You will find a lot of information in web on how to setup cordova and develop a cordova app. Once you add the barcode scanner plugin you should able to access the camera of the phone to scan the barcode in your SAPUI5 app.

Regards,Midhun

SAP Technology RIG