Git Product home page Git Product logo

Comments (8)

don avatar don commented on June 26, 2024

@jasonm23 Which platform did you see this on?

from phonegap-nfc.

jasonm23 avatar jasonm23 commented on June 26, 2024

Sorry, late response. this is on Android.

from phonegap-nfc.

don avatar don commented on June 26, 2024

Re-opening for Android

from phonegap-nfc.

don avatar don commented on June 26, 2024

Callback is in the code https://github.com/chariotsolutions/phonegap-nfc/blob/master/src/android/src/com/chariotsolutions/nfc/plugin/NfcPlugin.java#L292 need to research why it's not firing

from phonegap-nfc.

don avatar don commented on June 26, 2024

The callback is begin called in the latest code 542dc37

Note that the callback is called when the message is published, not when a peer reads it. (That's different callback that is not in phonegap-nfc yet)

D/CordovaLog(30521): Received Event: deviceready
I/Web Console(30521): Received Event: deviceready at file:///android_asset/www/js/index.js:35
D/NfcPlugin(30521): execute shareTag
D/CordovaLog(30521): NFC Share [Success]
I/Web Console(30521): NFC Share [Success] at file:///android_asset/www/js/index.js:18

from phonegap-nfc.

jasonm23 avatar jasonm23 commented on June 26, 2024

The NFC event that's useful is after peer reads shared tag, and the event I
was referring to.

On Thursday, 9 May 2013, Don Coleman wrote:

The callback is begin called in the latest code 542dc37542dc37

Note that the callback is called when the message is published, not when a
peer reads it. (That's different callback that is not in phonegap-nfc yet)

D/CordovaLog(30521): Received Event: deviceready
I/Web Console(30521): Received Event: deviceready at
file:///android_asset/www/js/index.js:35
D/NfcPlugin(30521): execute shareTag
D/CordovaLog(30521): NFC Share [Success]
I/Web Console(30521): NFC Share [Success] at
file:///android_asset/www/js/index.js:18


Reply to this email directly or view it on GitHubhttps://github.com//issues/74#issuecomment-17638515
.

Sent from Gmail Mobile

from phonegap-nfc.

don avatar don commented on June 26, 2024

The native code would need to register an onNdefPushCompleteCallback with NfcAdapter.html.setOnNdefPushCompleteCallback

I'm not sure if this should always be called, should be optional, so should be another method call. I'll need to look at the other platforms to see if this can be done in a cross platform way.

http://developer.android.com/reference/android/nfc/NfcAdapter.html#setOnNdefPushCompleteCallback(android.nfc.NfcAdapter.OnNdefPushCompleteCallback,%20android.app.Activity,%20android.app.Activity...)

from phonegap-nfc.

don avatar don commented on June 26, 2024

Should implement on Windows too http://msdn.microsoft.com/en-us/library/windows/apps/hh701134.aspx

from phonegap-nfc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.