NFC Android wear (Huawei watch 2.0)

匿名 (未验证) 提交于 2019-12-03 08:28:06

问题:

I am new to Android Wear development (standalone application) and currently building an NFC reader for wear. The problem I am facing is with the function

adapter.enableForegroundDispatch(activity, pendingIntent, filters, techList) 

Whenever I run my code it is throwing an "unsupported exception" in the onResume method. (The same piece of code works perfectly fine on the phone )

From what I have understood, in order to detect a tag the application needs to be in the foreground which is done by the above function. Since it is failing here, my pending intent is null and no tag is getting detected. Any information regarding this would be helpful.

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