android-applicationrecord

Android: Receiving and processing NDEF records

家住魔仙堡 提交于 2020-01-06 08:30:52
问题 What I've been trying to do is send an integer and receive it and then take that integer and set it to the timer that's counting down. So far I am able to send the integer and have the application open on the other device, However when the device loads the activity, it opens the MainActivity and not the Newgame activity. I must admit at this point I'm not code smart and a bit of a novice but here is the extract of code which deals with NFC Communication, This extract is from the Newgame.java:

Cross platform launch records with extra data on Windows Phone and Android

為{幸葍}努か 提交于 2020-01-05 03:09:29
问题 Is it possible to create a cross platform NDEF Message to start an application on Android and Windows Phone passing additional data to the app? What I am trying to do: I have an application installed on Android and Windows Phone. It should be possible to start the applications with an NFC tag and I need to pass additional data from the tag (any string) to my applications. To start the applications with the NFC tags, I created a Windows Phone LaunchApp Record and an Android Application Record

Android NFC sensing and read tag data at the same time

拟墨画扇 提交于 2019-12-25 07:19:07
问题 I have a question about the android NFC. I have already done the function about read and write, but still have one problem. I wrote the AAR in my tag, after first sensing, it can launch my application. Second time sensing (my application is launched), I can read the data from NFC tag. Is it possible just sensing once that can launch my application and get the data from tag? 回答1: In AndroidManifest - <activity android:name=".TagDiscoverer" android:alwaysRetainTaskState="true" android:label="

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

痞子三分冷 提交于 2019-12-17 19:37:17
问题 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

Samsung Nexus S vs HTC - NFC Intent Filter + AAR

蓝咒 提交于 2019-12-12 18:26:28
问题 I save the AAR on my NFC-Tag. If I scan the TAG with the Nexus S (Android 4.1.1), i get the NfcAdapter.ACTION_NDEF_DISCOVERED and the NFCReaderActivity directly starts. If I do the same with the HTC X (Android 4.0.3), the application starts but I just get the android.intent.action.MAIN and so the NFCReaderActivity doesn't show up and the Tag isn't scanned. This works on Samsung Nexus S but not on HTC: <activity android:name=".activities.NFCWriterActivity"></activity> <activity android:name="

Android AAR + Intent Filter: clarification

落爺英雄遲暮 提交于 2019-12-11 08:25:13
问题 Based on this documentation available at Android NFC doc: If a tag contains an AAR, the tag dispatch system dispatches in the following manner: Try to start an Activity using an intent filter as normal. If the Activity that matches the intent also matches the AAR, start the Activity. If the Activity that filters for the intent does not match the AAR, if multiple Activities can handle the intent, or if no Activity handles the intent, start the application specified by the AAR. If no

Trying to ignore all NFC intents while in foreground with enableForegroundDispatch

偶尔善良 提交于 2019-12-11 04:12:15
问题 I'm trying to get my app to ignore nfc commands while running - its launched by an NFC tag with an Android Application Record (AAR), and I dont want it to be able to be launched by that when its already running.. I've tried to carefully follow others examples, but the app is still able to be launched by AARs while running (in foreground). Manifest.xml: <application> <activity> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category

AndroidApplicationRecord and Google Analytics

雨燕双飞 提交于 2019-12-11 03:23:25
问题 I'm developing an application which can be installed and opened via an AndroidApplicationRecord (AAR, see http://developer.android.com/guide/topics/nfc/nfc.html). If a user installs the app coming from other sources I'm adding a Google Analytics referrer to the Google Play link in order to track the source of installation. Is there a way to add this referrer to the AAR or as an additional NDEFRecord so that this source can be tracked as well? 回答1: The process behind the AAR is completely

Application launched by Action Main (from AAR) instead of NDEF Discovered

给你一囗甜甜゛ 提交于 2019-12-10 12:14:53
问题 I'm trying to launch my application by scanning a tag, but the intent I get is the action Main and not the NDEF Discovered as I would like. Here is my code I use to write the NdefMessage : NdefRecord aar = NdefRecord.createApplicationRecord("com.example.mynfc"); NdefRecord record = createUriRecord("www.stackoverflow.com"); NdefMessage message = new NdefMessage(new NdefRecord[]{record, aar}); with the createUriRecord : private NdefRecord createUriRecord(String text){ String uniqueId = text

NFC Tag is null when more than >1 NdefRecord

…衆ロ難τιáo~ 提交于 2019-12-08 13:50:54
问题 Im a newbie at NFC on Android, but have managed to have an app read & write to a NFC tag. Originally, I had one NdefRecord in a NdefMessage on the tag, basically some data. I was successful at retrieving the data from the tag whenever I scanned it. I then wanted to add an application record, so that if user's scan my tag and do not have my app, they are redirected to the PlayStore. When I introduced the application record to the tag, every time I scan the tag my activity starts/resumes by