feat: add nfc step 2 - receive with invoice
This commit is contained in:
+5
-10
@@ -104,17 +104,12 @@ class WalletNotificationService : Service() {
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
// Step 1: Call startForeground immediately — Android requires this within
|
||||
// 5 seconds of startForegroundService() or the app is ANR'd.
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
startForeground(
|
||||
NotificationConstants.NOTIF_ID_SERVICE,
|
||||
NotificationHelper.buildServiceNotification(this),
|
||||
ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC
|
||||
)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { // API 34
|
||||
startForeground(NotificationConstants.NOTIF_ID_SERVICE, NotificationHelper.buildServiceNotification(this), ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE)
|
||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
startForeground(NotificationConstants.NOTIF_ID_SERVICE, NotificationHelper.buildServiceNotification(this), ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC)
|
||||
} else {
|
||||
startForeground(
|
||||
NotificationConstants.NOTIF_ID_SERVICE,
|
||||
NotificationHelper.buildServiceNotification(this)
|
||||
)
|
||||
startForeground(NotificationConstants.NOTIF_ID_SERVICE, NotificationHelper.buildServiceNotification(this))
|
||||
}
|
||||
|
||||
// Step 2: Open the WebSocket. If already open (e.g. service restarted
|
||||
|
||||
Reference in New Issue
Block a user