Comments (15)
Hithere, Did you add
<preference name="android-targetSdkVersion" value="33" />
in the config.xml?
Greetings, Simeon
save me! Thanks
from cordova-plugin-android-permissions.
I had the same problem.
OS: Android 13
Compile with SDK 32 or 33
When I made the "requestPermission" for POST_NOTIFICATIONS, I receive an error :
{
error: "requestPermission"
message: "Unknown error."
}
I try to request READ_CONTACTS and I receive success with { hasPermission: false }
and nothing shown
from cordova-plugin-android-permissions.
Hithere, Did you add
<preference name="android-targetSdkVersion" value="33" />
in the config.xml?
Greetings, Simeonwhere is those config.xml file location ?
For projects created with the Cordova CLI (described in The Command-Line Interface), this file can be found in the top-level directory:
app/config.xml
Hope this helps.
Greetings
from cordova-plugin-android-permissions.
same. not working
nothing show....
from cordova-plugin-android-permissions.
Hi, I have the same problem has anyone found a solution for this issue?
from cordova-plugin-android-permissions.
I have the same problem. The Allow permission modal is NOT shown for POST_NOTIFICATIONS
If I change permission to CAMERA then it works - the Allow permission modal IS shown. BUT not the first time. The app must be restarted for it to start working. Weird
Android Target SDK: android-33
Android Compile SDK: 33
is there an alternate plugin?
from cordova-plugin-android-permissions.
Add the required permission here:
from cordova-plugin-android-permissions.
Hithere,
Did you add
<preference name="android-targetSdkVersion" value="33" />
in the config.xml?
Greetings,
Simeon
from cordova-plugin-android-permissions.
i have the same problem:
from cordova-plugin-android-permissions.
I have same problem
<preference name="android-targetSdkVersion" value="33" />
permissions
.hasPermission(
permissions.POST_NOTIFICATION,
(status: any) => {
if (!status.hasPermission) {
permissions
.requestPermission(
permissions.POST_NOTIFICATION,
(data: any) => {
console.log('PERMISIONS', data);
result.resolve(true);
},
() => {
result.reject(false);
}
)
}
}
);
from cordova-plugin-android-permissions.
Hithere, Did you add
<preference name="android-targetSdkVersion" value="33" />
in the config.xml?
Greetings, Simeon
where is those config.xml file location ?
from cordova-plugin-android-permissions.
Hi,
permissions.POST_NOTIFICATION is still not working.
I am using cordova android 11 and the persmission window have not shown.
from cordova-plugin-android-permissions.
Use this plugin cordova.plugins.diagnostic
.
from cordova-plugin-android-permissions.
Hi @wtto00
thx for advice and I tested it. I found usefull these two methods isRemoteNotificationsEnabled and switchToNotificationSettings
let diagnostic = (cordova.plugins as any)?.diagnostic;
diagnostic.isRemoteNotificationsEnabled((enabled) => {
console.log("Remote notifications are " + (enabled ? "enabled" : "disabled"));
}, (error) => {
console.error("The following error occurred: " + error);
});
diagnostic.switchToNotificationSettings();
from cordova-plugin-android-permissions.
This is what worked for me with the plugin .
var permissions = cordova.plugins.permissions;
permissions
.hasPermission(
permissions.POST_NOTIFICATIONS,
(status) => {
if (!status.hasPermission) {
permissions
.requestPermission(
permissions.POST_NOTIFICATIONS,
(data) => {
alert('PERMISIONS: ' + JSON.stringify(data));
},
(err) => {
alert('PERMISIONS: ' + JSON.stringify(err));
}
)
}
}
);
add this to the manifest:
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
from cordova-plugin-android-permissions.
Related Issues (20)
- NFC permissions Not Working HOT 1
- Cordova Permissions not working Quasar HOT 1
- Any way to "Predict" if User will be prompted for Permission? HOT 3
- How can i check `MANAGE_EXTERNAL_STORAGE`(all file access) in android? HOT 7
- BLUETOOTH_CONNECT permission missing in permissions.js HOT 2
- Background Location permission issue HOT 5
- BLUETOOTH_CONNECT + BLUETOOTH_SCAN missing for Android +10 HOT 4
- plugins/cordova-plug…w/permissions.js:38 Uncaught SyntaxError: Unexpected token ':' HOT 1
- Support Android 13 (API 33) HOT 5
- BLUETOOTH_SCAN doesn't show confirm dialog to the user HOT 4
- Android 13 SDK 33 - no dialog HOT 5
- uses-feature and camera request in Ionic 6 HOT 3
- Camera permission is not turned on?? HOT 1
- android build faild HOT 1
- Permissions not popping up HOT 10
- Storage permission not showing up HOT 2
- BSF Cordova Ecosystem Crowdfunding Plan HOT 2
- POST_NOTIFICATIONS don't work for Android 10 HOT 1
- Trouble with requesting SCHEDULE_EXACT_ALARM permission for Android 14 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-android-permissions.