Use case: I want a passing by user to Tap his phone on my Kiosk Android Device and get my store's URL opened on his phone's default browser app.
The only option that I could think of the three available (HCE, R/W, P2P) is P2P with Beam. But, the issue, as soon as the user taps the device on my NFC, the whole application shrinks and embeds in a Black UI with a label that says "Touch to Beam". Is there a way I could avoid this 2 step process?
It thought it must be possible because, when we share a URL from chrome app using Beam, it just opens in the other device not asking to "Touch to Beam". But I could not find any answer that supports it.
fun send(activity: Activity, url: String, callback: (Boolean)->Unit){
mCallback = callback
mNfcAdapter?.setOnNdefPushCompleteCallback(this, activity)
mNfcAdapter?.setNdefPushMessage( NdefMessage(NdefRecord.createUri(Uri.encode(url))), activity)
}
override fun onNdefPushComplete(event: NfcEvent?) {
mCallback?.invoke(true)
}