Android的检查,如果NFC标签靠近 [英] Android check if nfc tag is near

查看:142
本文介绍了Android的检查,如果NFC标签靠近的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能检查(定期)如果一个NFC标签靠近?我想提出一个车载支架和德恩我拿手机了车内部的NFC标签,手机应该停止发送GPS。

Is it possible to check (periodically) if a nfc tag is near? I want to put an nfc tag inside a car holder and wenn i take the phone out of the car, the phone should stop sending GPS.

所有我能找到的是这样的:<一href=\"http://stackoverflow.com/questions/23441430/how-to-confirm-whether-there-is-a-nfc-tag-exists-in-android-now\">How以确认是否有一个Android的NFC标签的存在呢?
但在我的情况显示是关闭的。

All i could find was this: How to confirm whether there is a NFC tag exists in Android now? But in my scenario the Display is off.

有没有办法做到这一点还是有办法来检测时,有没有NFC标签?

Is there a way to do this or is there a way to detect when there is no nfc tag?

推荐答案

不幸的是,你可以当显示器是没有过。当屏幕关闭Android的读/写器模式是禁用的。

Unfortunately you can't when the display is off. Android's reader/writer mode is disabled when the screen is off.

除了Android的NFC的默认行为,有一个应用这使得它可以检测到NFC标签当屏幕处于关闭状态(甚至锁定)。我没有测试它自己,但如果你想实现这一点,你可以试试看。我猜你的手机必须扎根使用该应用程序。

Beside the default behaviour of Android's NFC, there is an application which make it possible to detect NFC tags when the screen is off (or even locked). I did not tested it myself, but if you want to achieve this you can give it a try. I guess your phone needs to be rooted to use this application.

这篇关于Android的检查,如果NFC标签靠近的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆