标签: ndef

Xcode Testflight 验证错误 ITMS-90778 NDEF 被禁止

我正在尝试将我的应用程序上传到使用CoreNFC (NDEF) 的 TestFlight

不幸的是,我在(SDK 版本 13 和 13.1)中的 Testflight Validate 部分收到了错误消息。

我已经试过了:Xcode 11 beta can't upload app to TestFlight

但它会失去 NDEF 功能:https : //stackoverflow.com/a/58128365/5588637

错误消息:核心 nfc 框架的权利无效 sdk 版本 13.0 和 min OS 版本 13.0 与权利 'com. 苹果开发者NFC。Readersession 格式,因为 NDEF 被禁止
在此处输入图片说明

xcode nfc ios ndef swift

8
推荐指数
3
解决办法
4008
查看次数

使用NDEF Android应用程序记录(AAR)获取NFC标签

我正在研究NFC应用程序.要启动我的应用程序,我正在使用带有AAR NDEF记录的NDEF标记.

这很好用.但现在我想直接用app阅读标签内容.我怎样才能做到这一点?

(它已经有效,当我从手机中取出标签并再次触摸它时,但我想取消这一步.)

表现:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="nfctagscanner.mobileapps.lt.nfctagscanner" >
    <uses-feature android:name="android.hardware.nfc" android:required="true"/>
    <uses-permission android:name="android.permission.NFC" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />


            </intent-filter>


        </activity>
        <activity
            android:name=".NFCScanActivity"
            android:label="@string/app_name" >
            <intent-filter>

                <action android:name="android.nfc.action.NDEF_DISCOVERED" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="nfctagscanner.mobileapps.lt.nfctagscanner" android:host="ext"
                    android:pathPrefix="/android.com:pkg" />
            </intent-filter>
        </activity>
    </application>

</manifest>
Run Code Online (Sandbox Code Playgroud)

而我只想获得NDEF_DISCOVERED意图.但我总是得到action.MAIN/category.LAUNCHER意图与我的调试器.

任何帮助将不胜感激.我基于此做了我的工作:Android/NFC:在没有新Intent的情况下在onCreate()中获取标签

android nfc intentfilter ndef android-applicationrecord

7
推荐指数
1
解决办法
4614
查看次数

你如何检查Android设备是否支持SNEP或Android的Ndef推送协议?

您可以在Android 文档中找到它:

为了使NDEF正常运行,其他NFC设备必须支持NFC论坛的SNEP(简单Ndef交换协议)或Android的"com.android.npp"(Ndef推送协议).这在Gingerbread级别的Android NFC设备上是可选的,但SNEP在Ice-Cream-Sandwich及其他设备上是强制性的.

您如何检查设备是否能够与其他设备通信NFC P2P?因为我们试图测试各种样本的NFC P2P代码没有成功!(NFC标签工作正常).

目前正在发生的是这两种设备都会产生熟悉的NFC嗡嗡声,但似乎没有数据交换.

FYI设备是索尼Xperia Sole/SolaLG Optimus 4X HD,相应地更新了Android版本4.0.4和4.0.3.

另请注意:开发是针对Gingerbread版本,Android API版本10.

android nfc ndef nfc-p2p

6
推荐指数
1
解决办法
579
查看次数

从Android应用程序中读取NFC标签中的NDEF消息

我正在尝试使用NFC创建应用程序,我只是想尝试读取NFC标签并从标签中获取文本消息并将其放入TextView.我已经有了代码,但是当我尝试将手机与NFC标签配对时没有任何反应.

这是我的代码,有人可以看看它,看看我做错了什么,需要做些什么来解决问题:

Button measurementsDataButton;
NfcAdapter myNfcAdapter;
PendingIntent myPendingIntent;
IntentFilter ndef;
IntentFilter[] filters;
String[][] techLists;
int mCount;
TextView mText;
String payload;
byte payloadHeader;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_nfc_scanner);

    final ActionBar actionBar = getActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);

    mText = (TextView) findViewById(R.id.flowTextView1);

    measurementsDataButton = (Button) findViewById(R.id.measurementsButton1);
    measurementsDataButton.setOnClickListener(this);

    myNfcAdapter = NfcAdapter.getDefaultAdapter(this);

    myPendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);

    ndef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
    filters = new IntentFilter[] {ndef, };
    techLists = new String[][] {new String[] {Ndef.class.getName()}, new String[] {NdefFormatable.class.getName()}};
}

@Override
public void …
Run Code Online (Sandbox Code Playgroud)

android payload nfc android-pendingintent ndef

6
推荐指数
1
解决办法
3万
查看次数

Android NFC writeNdefMessage抛出IOException标签不是ndef

我正在开发一个NFC环境,包括一个标签(AS3953芯片+微控制器)和一个智能手机(三星Galaxy Fame runnung Android 4.1.2).

在阅读NDEF消息时,我仍然坚持将消息写入标签.我从http://tapintonfc.blogspot.de/2012/07/the-above-footage-from-our-nfc-workshop.html复制了大部分代码, 并通过搜索标签技术列表将其修改为接受ISO14443A标签类型4对于支持技术()中的IsoDep,NfcA和Ndef.由于列出了所有这些,app继续writeTag():

public WriteResponse writeTag(NdefMessage message, Tag tag) {
try {
    Ndef ndef = Ndef.get(tag);
    if (ndef != null) {
        Log.d(TAG, "writeTag: tag type: "+ndef.getType());
        ndef.connect();
        Log.d(TAG, "writeTag: connected!");
        if (!ndef.isWritable()) {
            return new WriteResponse(0, "Tag is read-only");
        }
        if (ndef.getMaxSize() < message.toByteArray().length) {
            return new WriteResponse(0, "size error");
        }
        Log.d(TAG, "writeTag: write ndef...");
        ndef.writeNdefMessage(message);
        Log.d(TAG, "writeTag: wrote ndef!");
        if (writeProtect)
            ndef.makeReadOnly();
        return new WriteResponse(1, "Wrote message to pre-formatted tag.");
    } else { …
Run Code Online (Sandbox Code Playgroud)

android nfc ndef

6
推荐指数
1
解决办法
3694
查看次数

enableForegroundDispatch和disableForegroundDispatch有什么作用?

我阅读了文档,我不太明白它们是做什么的.考虑到Android做出了令人费解的决定,我们现在需要使用Android Beam将数据从一个手机发送到另一个手机,并且没有办法同时从两者发送数据到两者,我看不到用途.

我不能只拨打setNdefPushMessage一部电话,并onNewIntent在另一部电话中进行回叫,如果NfcAdapter.ACTION_NDEF_DISCOVERED.equals(intent.getAction())是真的话会做一些事吗?

什么是点enableForegroundDispatchdisableForegroundDispatch

android nfc android-intent ndef nfc-p2p

6
推荐指数
1
解决办法
3441
查看次数

NDEF与APDU NFC Android

您能否告诉我NDEF(NFC数据交换格式)和APDU(应用协议数据单元)之间的区别.

我开发了一个读取NDEF消息的Android应用程序,我想知道它是否也适用于APDU数据.

android apdu nfc ndef contactless-smartcard

6
推荐指数
1
解决办法
5399
查看次数

iOS11核心NFC和ISO 14443

据我了解,iOS11 Core NFC仅支持NDEF。这是否意味着它仅支持ISO 15693标签而不支持ISO 14443(-3或-4)?

我知道您可以在NDEF中发送APDU,但这不是ISO7816。如果我错了,请纠正我。简单来说,CoreNFC是否支持ISO 14443(-3 / -4)?

apdu nfc ios ndef contactless-smartcard

6
推荐指数
1
解决办法
4664
查看次数

NFC 服务在一段时间后失效的可能原因是什么?

我们使用 NFC 标签作为进出的停车票。在每个入口处,标签上都会写入一些数据,而在出口处,该数据会验证车辆的出口。

\n\n

部分车辆进出后,NfcService失效,智能手机无法检测到NFC标签。设备需要重新启动才能重新启动 NfcService,然后设备再次开始正常工作。

\n\n

此错误是随机出现的,我们无法在开发环境中重现此错误,但我们在停车场出入口安装的设备上多次观察到此问题。

\n\n

\n\n

当我们调试这个问题时,我们能够以某种方式管理上述日志。

\n\n

我们尝试了不同的更改,例如使用enableReaderMode而不是enableForegroundDispatch,但问题仍然存在。

\n\n
public void enableReaderMode() {\n    try {\n    Log.d("WTF", "Enabling reader mode");\n    NfcAdapter nfc = NfcAdapter.getDefaultAdapter(this);\n\n    if (nfc != null) {\n        int flags = NfcAdapter.FLAG_READER_NFC_A ;\n\n            nfc.enableReaderMode(this, new NfcAdapter.ReaderCallback() {\n                @Override\n                public void onTagDiscovered(Tag tag) {\n                    runOnUiThread(new Runnable() {\n                        @Override\n                        public void run() {\n                            Log.d("WTF", "Tag discovered");\n                            String uid = ByteArrayToHexString(tag.getId());\n                            Toast.makeText(MainActivity.this, getString(R.string.message_tag_detected), Toast.LENGTH_SHORT).show();\n                            Ndef ndef = Ndef.get(tag);\n\n                            if (isNFCDialogDisplayed) {\n\n                                if (isWrite) {\n\n …
Run Code Online (Sandbox Code Playgroud)

android nfc android-service ndef deadobjectexception

6
推荐指数
1
解决办法
3890
查看次数

Android HCE 卡模拟不调用 processCommandApdu

我正在尝试模拟 NDEF NFC 标签,但processCommandApdu没有被调用。该服务似乎已启动,我尝试了多种 AID,但似乎没有任何效果。我还尝试过使用 PackageManager 来启动 HCE。不确定我做错了什么?

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

    <service android:name=".MyHostApduService"
        android:exported="true" android:permission="android.permission.BIND_NFC_SERVICE">
        <intent-filter>
            <action android:name="android.nfc.cardemulation.action.HOST_APDU_SERVICE"/>
            <category android:name="android.intent.category.DEFAULT"/>
        </intent-filter>
        <meta-data android:name="android.nfc.cardemulation.host_apdu_service" android:resource="@xml/apduservice" />
    </service>

    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

    </activity>
</application>


<host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/servicedesc"
android:apduServiceBanner ="@string/servicedesc"
android:requireDeviceUnlock="false">
<aid-group android:description="@string/servicedesc"
    android:category="other">
    <aid-filter android:name="D2760000850101"/>
    <aid-filter android:name="A0A1A2" />
    <aid-filter android:name="B0B1B2B3" />
    <aid-filter android:name="C0C1C2C3C4" />
    <aid-filter android:name="D0D1D2D3D4D5" />
    <aid-filter android:name="E0E1E2E3E4E5E6" />
</aid-group>
Run Code Online (Sandbox Code Playgroud)

public class MyHostApduService extends HostApduService {

enum CardSelect { …
Run Code Online (Sandbox Code Playgroud)

java android nfc ndef hce

6
推荐指数
0
解决办法
1583
查看次数