check for sdk version before calling SetLocalOnly
This commit is contained in:
@@ -140,8 +140,9 @@ namespace keepass2android
|
|||||||
_ctx.GetString(Resource.String.menu_copy_totp),
|
_ctx.GetString(Resource.String.menu_copy_totp),
|
||||||
GetPendingIntent(Intents.CopyTotp, Resource.String.menu_copy_totp)));
|
GetPendingIntent(Intents.CopyTotp, Resource.String.menu_copy_totp)));
|
||||||
|
|
||||||
// Don't show on wearable devices
|
// Don't show on wearable devices if possible
|
||||||
notificationBuilder.SetLocalOnly(true);
|
if ((int)Build.VERSION.SdkInt >= 20)
|
||||||
|
notificationBuilder.SetLocalOnly(true);
|
||||||
|
|
||||||
notificationBuilder.SetPriority((int)Android.App.NotificationPriority.Max);
|
notificationBuilder.SetPriority((int)Android.App.NotificationPriority.Max);
|
||||||
var notification = notificationBuilder.Build();
|
var notification = notificationBuilder.Build();
|
||||||
|
|||||||
Reference in New Issue
Block a user