flomio / cordova-plugin-flomio

Flomio SDK plugin for Cordova.
10 stars 8 forks source link

Cordova plugin Android #25

Open nicooler opened 7 years ago

nicooler commented 7 years ago

Hi flomio Team, I tryed to add the flomio sdk to my meteor Application, for iOS I managed it, but in Android it just doesnt work. As a hint it seems to be missing in documentation that in Android the plugin is called: floPlugin. instead of flomioPlugin. as in iOS. But the thing is that I cant connect my Android App to the flomio

floPlugin.init() undefined floPlugin.selectDeviceType('FloBLE-Plus') FlomioPlugin.js:34 ERROR: FlomioPlugin.selectDeviceType: Invalid action undefined

I added the libsdkclasses.aar to the lib in my cordova android build, but no luck so far.

Please help me guys..

Thx Cheers Nico

grundyoso commented 7 years ago

hey nico, we've yet to implement the Android version of the Cordova plugin... I will ping @darienalvarez in order to get working on this...

nicooler commented 7 years ago

Thank you Richard. Hope we get this working pretty soon. ;-)

one small thing I found out is that this: [plugin.xml]

   <clobbers target="floPlugin" />

should be actually like this

   <clobbers target="flomioPlugin" />

Once we get this one working on Android, I will write you the README.md for adding the Cordova plugin for Android, if you like?

Cheers Nico

nicooler commented 7 years ago

@darienalvarez Hi Darien, how is it going? Did you have a chance to take a look at this? Let me know if you need more information. Cheers Nico

grundyoso commented 7 years ago

Hey Nico, @darienalvarez was able to complete the refactoring of the Flomio SDK on Android to allow for our readers to be supported in parallel with native NFC functionality. This was a substantial architectural challenge for us but one that will simplify things for developers in many ways. In particular, handling NFC events and tag structures will be uniform. Since a lot has changed we're going through a testing period to make sure there are no major issues. The new SDK can be downloaded here. He also prepared a Test App that simplifies testing for customers... you can download the signed APK for that here.

Upon launching the Test App, it will list 3 options:

  1. Native
  2. FloBLE Plus
  3. FloBLE EMV

choose FloBLE Plus and turn on your reader device. You should see the unit listed and the connection should be automatically established. This is signaled by a green icon on the right. Once you get the green icon (not red), then select the reader from the list and the app will transition into a more detailed view. At the bottom of this view is an APDU field. Place the NFC tag on the reader and listen for the polling beep. Leave the NFC tag in the field and send the "FF CA 00 00 00" command. You should see:

resp-> 04 CE 33 82 E3 25 80 90 00

where the first 7 hex pairs are your UUID. Let us know how things go and if you observe and issues. You can post those here and it will move us toward getting the Cordova Plugin done for this release.

iMarcky commented 6 years ago

Hi, Was this implemented ? On the website it's still says that it is coming soon for android. I'm really looking forward using this for some of my clients but I neeed it on android!

Thank you guys & don't give up on this 👍 !

grundyoso commented 6 years ago

we're still working on it... we're shorthanded an Android dev at the moment so despite the plugin working really well on iOS we haven't been able to get it done for Android. Is this something that's mission critical for you? would you be interested in purchasing Flomio Service hours to get it done??