cancel
Showing results for 
Search instead for 
Did you mean: 

How to integrate phonegap-NFC inside a SAPUI5 app on Sap Cloud Platform

Hi guys,

i need to make a sample app on Sap Cloud Platform (with Web-IDE) that reads the NFC tags and show the result on display. It seams simple but just adding the plug-in of phonegap-NFC isn't enough 🙂

Here is what i did after adding the plug-in:

_NFC_Read:
function (oEvent) {             
this.getModel("masterView").setProperty("/title","Entering");                        
cordova.plugins.nfc.enabled(this._on_NFC_Success, this._on_NFC_Fail);                       
},

and this is the error:

Uncaught TypeError: Cannot read property 'enabled' of undefined
at f._NFC_Read (Master.controller.js?eval:259)
    at f.b.fireEvent (EventProvider-dbg.js:228)
    at f.b.fireEvent (Element-dbg.js:531)
    at f.firePress (ManagedObjectMetadata-dbg.js:762)
   at f.d.ontap (Button-dbg.js:289)
    at f.b._handleEvent (Element-dbg.js:259)
    at constructor.U._handleEvent (UIArea-dbg.js:892)
    at HTMLBodyElement.dispatch (jquery-dbg.js:4737)
    at g (jquery-mobile-custom-dbg.js:1972)
    at HTMLBodyElement.r (jquery-mobile-custom-dbg.js:2091)

Do you have any suggestion?

I just need to read a simple NFC code.

Thanks in advance,

Ndricim.

nabheetscn
Active Contributor
0 Kudos

Hello

Normally you can do this via an app a hybrid or a native one with use of cordova in case of hybrid app. In case you want to do it via browser i believe we have certain limitation but believe this document shall help you.

Thanks

Nabheet

Accepted Solutions (0)

Answers (1)

Answers (1)

Hi Nabheet,

thank you for your answer, in fact i want to do it via a sample hybrid app but i can't find any example in the various documentations or blogs.

I would appreciate if you have any indication.

Thank you,

Ndricim