NFC. Start a activity when scanning NDEF message

前端 未结 2 1028
清歌不尽
清歌不尽 2021-01-07 10:51

I\'m trying to start a activity when my smartphone scans an NDEF message. This is my manifest:




        
2条回答
  •  粉色の甜心
    2021-01-07 11:25

    The trick is that NFC Forum external type names are case-insensitive. However, Android's intent filter system is case-SENSITIVE. Therefore, you must always use ALL lower-case external type names in your intent filters:

    
        
            
            
            
        
    
    

    Note that the NdefRecord.createExternal(...) method will automatically convert all type names to lower-case spelling.

提交回复
热议问题