Is it possible to launch an app when an NFC tag is scanned?

后端 未结 2 1500
执念已碎
执念已碎 2021-01-13 09:32

I have an NFC tag. I want to write an Android application that is automatically launched and gets data from NFC when the NFC tag is scanned with the phone.

This shou

2条回答
  •  旧巷少年郎
    2021-01-13 10:08

    Add following intent-filter to your main activity tag in the AndroidManifest.xml file.

    
    
        ...
        
            
            
        
        ...
    
    

    Now, when you tap your NFC tag to your phone, your application will be called and run.

提交回复
热议问题