I'm a beginner on Android.I have a question about using NFC to connect to BLE and launch the app.
When I read NFC tags in NDEF format on Android, I understand that the following 1,2 can be done respectively.
Therefore, I have two questions.
If you have any information, please let me know.
android bluetooth
I don't know if it's the answer I expected, but
In NDEF records, if AAR is included, your app is not foregrounded, or if you have not given startup priority in NfcAdapter#enableForegroundDispatches
,
By default, the application (or Google Play Store) for the package specified in AAR will be launched.If this is the app you created, I think there is basically no problem.
Now, to take into account the main idea of "How to Connect ~BLE After NFC Reads",
■ "Application launch → BLE connection"
If the NDEF message when launched above contains mac-address-specific information to connect the specified terminal to the BLE, you can connect using BluetoothAdapter
and so on.
■ BLE Connection → App Launch
Unlike iOS, Android is flexible for background processing, so I think it is possible to implement automatic connection of designated devices as Service
and startActivity
once the connection is confirmed.
I hope it will be helpful.
© 2025 OneMinuteCode. All rights reserved.