Android NFC restart App -


I use NFC to send a text app to my app on the device app on my app Device Nr.2 Then the device is in touch, both device popups "Touch the beam" UI. If I send touchscreen and beam messages NR.1 (by adding OT to the part) on the device - message sent, it's okay to do everything. But if I get the device number Touch 2 "touch the ray" UI (the message should be received) - Then my app NR on the device 1 has been reloaded The log code is not showing anything wrong, no error seems, this case app gets any kind of empty NFC message? But why does not it do anything on it? Why reload? I am using foreground despatches , I can make "program / text" without any manifest.

How can I control this situation, so users "touch the beam" "UI"?

If you do not set the Android beam in your app, then default behavior on the beam of Android is either Instructions have to be directed to another device to open the same app (first activity, which filters the menu / launcher intents of the same package name app on the source device as an app) or if your app is not installed Open Play Store Store listing it on an AAR (+ play store Link?) Is sent.

In your case, clicking on the Beam UI on Device 2, AAR is shipped to Device 1. As a result, your app will be opened on the device (again) 1. To overcome this, you can:

  1. Enable foreground transmissions for activity on device 1, so that The NDEF message can be received promptly processed by your app. I'm not sure that this beam collides with the UI.
  2. Change the NDEF message sent by Device 2 to not include an AAR using the Beam API.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -