Forum › MIFARE SDK › What does registerActivity do? › Reply To: What does registerActivity do?
As you can see in the example app and in the skeletons, enclosed with the AN, the library is initialized in onCreate() (like all other libraries would do it) and the library is located in the main activity, because only the main activity will receive NFC intents from Android. Of course, you can have more activities in your app, but only the main activity should be able to receive NFC intents
And that's a design flaw. You are forcing the users of the SDK to have only one activity capable of receiving NFC intents and then forcing to use some complicated methods to retrieve the data.
If you need processing of NFC data in other activities of your app, you should do it via separate threads or use other mechanisms of inter-app-communication.
The attempt to try to get NFC intents to multiple activities of the same app makes no sense for me, because this opens synchronization troubles
but I do not have time to download customer code and start investigations on this code.
+ 0
|
- 0