mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
[skip ci] push notification changes
This commit is contained in:
parent
74fb6e6b2c
commit
0aae072ae9
2 changed files with 28 additions and 0 deletions
|
@ -9,6 +9,8 @@
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||||
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".Application"
|
android:name=".Application"
|
||||||
|
@ -84,6 +86,23 @@
|
||||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||||
android:resource="@xml/provider_paths" />
|
android:resource="@xml/provider_paths" />
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
|
<!-- service to handle messaging events -->
|
||||||
|
<service
|
||||||
|
android:name=".NotificationFcmService"
|
||||||
|
android:exported="false">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
|
|
||||||
|
<!-- service to handle the foreground service -->
|
||||||
|
<service
|
||||||
|
android:name=".NotificationForegroundService"
|
||||||
|
android:foregroundServiceType="shortService"
|
||||||
|
android:exported="false"
|
||||||
|
android:stopWithTask="false">
|
||||||
|
</service>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
|
|
|
@ -211,6 +211,15 @@ abstract class LightningWalletBase extends ElectrumWallet with Store {
|
||||||
_isTransactionUpdating = false;
|
_isTransactionUpdating = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO: get actual nds service url:
|
||||||
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
|
String platform = Platform.isAndroid ? "android" : "ios";
|
||||||
|
String token = "TODO";
|
||||||
|
await sdk.registerWebhook(
|
||||||
|
webhookUrl: "https://your-nds-service.com/notify?platform=$platform&token=$token",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
print("initialized breez: ${(await sdk.isInitialized())}");
|
print("initialized breez: ${(await sdk.isInitialized())}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue