I am trying to implement "Tap and Pay(for payment transaction)" with NFC and Android Pay API.
I did not find any tutorials or examples regarding this.
I looked at developer.android.com but did not get it.
The above documentation talks about communicating with NFC using Host-based Card Emulation (I might be wrong)
How can this be achieved? Are there other APIs or do I have to integrate a payment protocol with a Host-based Card Emulation Service?
public class MyHostApduService extends HostApduService {
@Override
public byte[] processCommandApdu(byte[] apdu, Bundle extras) {
//Implement PAYMENT protocol here
}
@Override
public void onDeactivated(int reason) {
...
}
}