-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package dev.riverside.credit | ||
|
||
import android.nfc.cardemulation.HostApduService | ||
import android.os.Bundle | ||
|
||
class SmartTapHCE : HostApduService() { | ||
override fun processCommandApdu(commandApdu: ByteArray, extras: Bundle): ByteArray { | ||
// TODO: Handle the APDU command here | ||
// (return a response APDU according to the commandApdu received) | ||
return byteArrayOf() | ||
} | ||
|
||
override fun onDeactivated(reason: Int) { | ||
// TODO: Handle deactivation here | ||
// (this method will be called whenever the NFC link is deactivated or lost) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:description="@string/service_name" | ||
android:requireDeviceUnlock="false"> | ||
<aid-group | ||
android:description="@string/aid_group_description" | ||
android:category="payment"> | ||
<aid-filter android:name="F0010203040506" /> | ||
</aid-group> | ||
</host-apdu-service> |