android-applicationrecord

Android NFC start app (using AAR) and read text

南楼画角 提交于 2019-12-08 07:49:04
问题 I have NFC tag with plain text and AAR. When I tap an NFC to the phone, my app will start. But It just call onCreate() method and don't read the plain text. I have to tap again and then app will read the text. Can I somehow start app when I tap an NFC and at the sametime read the text? I use this manual for implement NFC function. 回答1: To make sure that you also receive the NDEF message, make sure that you have added an Intent filter for the type of message that is on the tag. 来源: https:/

Android NFC start app (using AAR) and read text

混江龙づ霸主 提交于 2019-12-07 20:42:25
I have NFC tag with plain text and AAR. When I tap an NFC to the phone, my app will start. But It just call onCreate() method and don't read the plain text. I have to tap again and then app will read the text. Can I somehow start app when I tap an NFC and at the sametime read the text? I use this manual for implement NFC function. To make sure that you also receive the NDEF message, make sure that you have added an Intent filter for the type of message that is on the tag. 来源: https://stackoverflow.com/questions/20082064/android-nfc-start-app-using-aar-and-read-text

AAR Record in NFC: Where's The Payload?

南笙酒味 提交于 2019-12-04 12:17:28
问题 According to this answer, and validated by testing, when you use Android Beam to push over an NFC message containing an AAR record, the receiving device will start the MAIN / LAUNCHER activity for the app specified in the AAR. That MAIN / LAUNCHER Intent does not contain the NfcAdapter.EXTRA_NDEF_MESSAGES extra. Hence, the data that we went through all the trouble to beam over appears to be lost if you use AAR. Is there some way to get the NFC messages that triggered the app to be started in

AAR Record in NFC: Where's The Payload?

ぐ巨炮叔叔 提交于 2019-12-03 07:02:10
According to this answer , and validated by testing, when you use Android Beam to push over an NFC message containing an AAR record, the receiving device will start the MAIN / LAUNCHER activity for the app specified in the AAR. That MAIN / LAUNCHER Intent does not contain the NfcAdapter.EXTRA_NDEF_MESSAGES extra. Hence, the data that we went through all the trouble to beam over appears to be lost if you use AAR. Is there some way to get the NFC messages that triggered the app to be started in this scenario? And if the answer is "no", then what is the use case of AAR? I can see where it might

Android / NFC: Get Tag in onCreate() without new Intent

ε祈祈猫儿з 提交于 2019-11-28 10:36:21
I am working on an NFC-application. To start my app, I am using a NDEF-tag with an AAR NDEF Record inside. This works fine. But now I want to read the tag content with the app directly. How can I do this? (It already works, when I remove the tag from the phone and touch it again, but I want to eliminate this step.) Update: Some more details Ok, to make it more clear, here are some parts of my current code. private NfcAdapter nfcAdapter; private static final int PENDING_INTENT_TECH_DISCOVERED = 1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

NFC tag detection is not calling onNewIntent and it's Launching From Main Activity

懵懂的女人 提交于 2019-11-27 20:49:09
I am new to NFC. I tried to connect to NFC and share the text data from a device to another device. I install my application on both devices and in one device I open my application and start tapping the device to the another device in order to transmit data over Beam. On the other device, my application opens due to the Beam interaction. However, the activity is started with the default MAIN intent action and not with TAG_DISCOVERED (or similar NFC intent). Every time it does the same thing. Also, it's not calling the onNewIntent() method. I tried to call onNewIntent from onCreate , but the

NFC tag detection is not calling onNewIntent and it's Launching From Main Activity

自闭症网瘾萝莉.ら 提交于 2019-11-26 20:30:21
问题 I am new to NFC. I tried to connect to NFC and share the text data from a device to another device. I install my application on both devices and in one device I open my application and start tapping the device to the another device in order to transmit data over Beam. On the other device, my application opens due to the Beam interaction. However, the activity is started with the default MAIN intent action and not with TAG_DISCOVERED (or similar NFC intent). Every time it does the same thing.

Get NFC tag with NDEF Android Application Record (AAR)

♀尐吖头ヾ 提交于 2019-11-26 08:35:26
问题 I am working on an NFC-application. To start my app, I am using a NDEF-tag with an AAR NDEF Record inside. This works fine. But now I want to read the tag content with the app directly. How can I do this? (It already works, when I remove the tag from the phone and touch it again, but I want to eliminate this step.) Manifest: <?xml version=\"1.0\" encoding=\"utf-8\"?> <manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" package=\"nfctagscanner.mobileapps.lt.nfctagscanner\" >