NFC tag scan only triggers my app to start

前端 未结 1 1512
离开以前
离开以前 2021-01-15 19:18

I have an app that scans NFC tags, collects the data from the tag and sends that data to the server. The data on the tag is in the following format:

1,3,3001         


        
1条回答
  •  执笔经年
    2021-01-15 20:15

    You could create a custom mimeType in your NDEF message and then create an intent-filter which matches it exactly. This would mean your app would be launched as it is the most specific filter.

    Example:

    
        
        
        
    
    

    Edit: Alternatively if you cannot create a custom mimeType then perhaps your utility will create a custom URL? Then you can create a filter for the custom url instead:

    
                
                
                
    
    

    0 讨论(0)
提交回复
热议问题