I have an IOT device containing a MCU + a Bluetooth LE interface + an NFC Interface.
In the NFC Tag, I write a NDEF message to do Bluetooth Pairing with Out Of Band (OOB) data. By this way, if someone puts his smartphone on the NFC tag, he can get connected to the IOT device automatically through Bluetooth LE.
I’m now wondering how I could launch an application on the Smartphone that would communicate with the IOT device to display the data.
In the NFC Tag, I could use an AAR Record but I already have a NDEF Record. Putting the 2 records in the NDEF is possible but I doubt that it would work. I expect Android to ask which one to process.
Is there another solution?
If I use only the Bluetooth Pairing record in the NFC tag, the pairing will be done and I should find a way to launch my application. In my app, I could use a background Service and a Broadcast Receiver that would be notified every times the Bluetooth gets connected. I haven’t tried yet but I think that it could be a way to wake up my application when a Bluetooth device is connected. It would check which profile the device has. If it is the expected profile, it would go on and display the data. I don't know if that's a good idea...
I’m not familiar with Bluetooth LE. Is there a way to tell to Android that my application should be launched every times a Bluetooth LE device with a given profile is connected?
Thanks for your advices