Domanda

I am trying to build an NFC enabled application that transmits data to another device via Android Beam (pushing a NDEFMessage).

While I know there is a success callback void onNdefPushComplete(NfcEvent event), I can't find a failure callback, which would be really useful. I tried to think of other way to sort of guess whether the transfer happened, if it succeeded or failed but cannot really find anything satisfying. Even a dirty timer would not work since I cannot know for sure when and even if the user actually starts the beam.

I feel pretty much bound by the API since the OS is handling most of the functionality and the application is only providing the message to send.

Any suggestions, something I might have missed? I'd rather avoid rooting the device if possible, but if it cannot be accomplished without tinkering with the core NFC code, then so be it.

Cheers

È stato utile?

Soluzione

No, there is no such callback. Or a notification or anything that would give you a clue that things didn't worked.

Unfortunately.

In general the Android Beam API has not been designed with error handling in mind.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top