With the playstore requiring the minimumTargetSDK version to be 33, it caused my notification libraries to no longer work with android 13.
Libraries Affected
1. awesome-cordova-plugins/local-notifications/ngx (Local Notification)
2. cordova-plugin-fcm-with-dependecy-updated/ionic/ngx (FCM)
Attemped Solution
Added necessary permission in Android Manifest
<uses-permission android:name="android.permission.NFC" />
Try to request for notification permission to no avail
The former function will return false for requestPermission() without showing the dialog for me to indicate if I want to grant permission to the app.
async askForLocalNotificationPermission() {
if (this.platform.is('android')) {
const hasPermission = await this.localNotifications.requestPermission();
if (hasPermission) {
console.log('Notification permission granted');
} else {
console.log('Notification permission denied');
}
}
}
The latter function will return true for requestPermission() without showing the dialog for me to indicate if I want to grant permission to the app.
async askForFCMNotificationPermission() {
if (this.platform.is('android')) {
const hasPermission = await this.fcm.requestPermission();
if (hasPermission) {
console.log('Notification permission granted');
} else {
console.log('Notification permission denied');
}
}
}