Android NFC function in ICS

两盒软妹~` 提交于 2019-12-12 02:45:25

问题


In Android ICS, there are 3 ways to share data by P2P. 1. enableForegroundNdefPush(existed from gingerbread) 2. setdefPushMessage 3. setNdefPushMessageCallback

As I tried, in Android ICS, calling enableForegroundNdefPush pop "Tap to share" UI to beam the data if "Tap to share" setting is on. Is there any way to share data by P2P without popping "Tap to share" UI even if "Tap to share" setting is on as enableForegroundNdefPush did in Android gingerbread.

Moreover, setLocalNdefMessage is removed from ICS, is there other API I could use to replace it?

Thanks for your help.


回答1:


No, at this moment there is no API to disable the UI when sharing P2P data.

setLocalNdefMessage() no longer exists, because almost every application will now share something over NFC by default - if the app itself doesn't share anything, the framework will automatically share a link to the app.



来源:https://stackoverflow.com/questions/8237259/android-nfc-function-in-ics

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!