{"action":"created","issue":{"url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/172","labels_url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/172/comments","events_url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/172/events","html_url":"https://github.com/chariotsolutions/phonegap-nfc/issues/172","id":58467786,"number":172,"title":"plugin doesn't share with latest BB10.3.1.2243","user":{"login":"firefoxpdm","id":2911221,"avatar_url":"https://avatars.githubusercontent.com/u/2911221?v=3","gravatar_id":"","url":"https://api.github.com/users/firefoxpdm","html_url":"https://github.com/firefoxpdm","followers_url":"https://api.github.com/users/firefoxpdm/followers","following_url":"https://api.github.com/users/firefoxpdm/following{/other_user}","gists_url":"https://api.github.com/users/firefoxpdm/gists{/gist_id}","starred_url":"https://api.github.com/users/firefoxpdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firefoxpdm/subscriptions","organizations_url":"https://api.github.com/users/firefoxpdm/orgs","repos_url":"https://api.github.com/users/firefoxpdm/repos","events_url":"https://api.github.com/users/firefoxpdm/events{/privacy}","received_events_url":"https://api.github.com/users/firefoxpdm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-21T17:50:47Z","updated_at":"2015-02-25T03:15:45Z","closed_at":null,"body":"Hi\r\n\r\nWe are trying to make a small app that would require p2p communication between phones. The plugin is working fine on Android 4.4.2, but we're having problems on BB10.\r\n\r\nThe first problem was that every time we tried to share data, the Evernote application popped up. This was finally solved by making a small change in the phonegap-nfc-blackberry.js file. Based on the information found on http://developer.blackberry.com/native/documentation/core/nfc.html we added an additional \"target\" : \"sys.NFCViewer\" parameter to the data passed to the blackberry.invoke. After that BB's NFC sharing screen appeared, however it displayed that the NFC content had no data in it, and subsequently showed a \"Failed to prepare data to share.\" error message. (http://oi57.tinypic.com/2hebre8.jpg)\r\n\r\nAfter this we checked out the https://github.com/don/phonegap-p2p demo application, hoping to figure out what the problem was, but it also wasn't working properly. When we clicked the \"Share Message\" checkbox a JS alert appeared with the text \"Failed to share tag undefined.\"\r\n\r\nAside to these, another interesting behaviour was that when we attached the addNdefListener, both the error and the success handlers were executed.\r\n\r\nThe strange thing is, the plugin seems to be able to properly handle incoming messages, it only has an issue with sharing them. Also, it is a bit problematic that the success handler for the share is called right when the BB NFC screen is displayed.\r\n\r\nIs there any chance you could have a look at these issues?\r\n\r\nCheers"},"comment":{"url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/comments/75898313","html_url":"https://github.com/chariotsolutions/phonegap-nfc/issues/172#issuecomment-75898313","issue_url":"https://api.github.com/repos/chariotsolutions/phonegap-nfc/issues/172","id":75898313,"user":{"login":"don","id":3133,"avatar_url":"https://avatars.githubusercontent.com/u/3133?v=3","gravatar_id":"","url":"https://api.github.com/users/don","html_url":"https://github.com/don","followers_url":"https://api.github.com/users/don/followers","following_url":"https://api.github.com/users/don/following{/other_user}","gists_url":"https://api.github.com/users/don/gists{/gist_id}","starred_url":"https://api.github.com/users/don/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/don/subscriptions","organizations_url":"https://api.github.com/users/don/orgs","repos_url":"https://api.github.com/users/don/repos","events_url":"https://api.github.com/users/don/events{/privacy}","received_events_url":"https://api.github.com/users/don/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T03:15:45Z","updated_at":"2015-02-25T03:15:45Z","body":"I can't get webworks to accept generic NDEF bytes or find any examples of code using `application/vnd.rim.nfc.ndef` to write generic NDEF messages. I'm not sure why this broke.\r\n\r\nAs a work around you could use blackberry invoke directly if you're only sending one text record or one uri record.\r\n\r\nPlain Text \r\n\r\n    query = {\r\n        \"action\": \"bb.action.SHARE\",\r\n        \"type\": \"text/plain\",\r\n        \"data\": \"hello, world\",\r\n        \"target\": \"sys.NFCViewer\"\r\n    };\r\n    blackberry.invoke.invoke(query, success, failure);\r\n\r\nURI\r\n\r\n    query = {\r\n        \"action\": \"bb.action.SHARE\",\r\n        \"uri\": \"http://cordova.io\",\r\n        \"target\": \"sys.NFCViewer\"\r\n    };\r\n    blackberry.invoke.invoke(query, success, failure);\r\n\r\n@mosonyi @firefoxpdm If you find code examples or more info, please post here."}}