question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ionic3 Android hasPermission, checkPermission always returns false

See original GitHub issue

Hi. I am using ionic 3.17.0 and trying to use the android-permissions plugin.

this.androidPermissions.requestPermission(this.androidPermissions.PERMISSION.READ_PHONE_STATE).then(() => {
   this.androidPermissions.hasPermission(this.androidPermissions.PERMISSION.READ_PHONE_STATE).then(data => {
   console.log("has Permission : "+JSON.stringify(data));
   });
});

I always get ‘hasPermission : false’ in IOS. How should I handle it? Thank you in advance.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
NeoLSNcommented, Feb 12, 2018
  1. 如果系統沒有特別被改動,應該是user目前的設定值
  2. 不能,因為系統不允許這樣的操作
0reactions
xumingyicommented, Aug 13, 2018

you need to use “@jiguang-ionic/jpush”: “1.0.2” this.jpush.getUserNotificationSettings()

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic Android permission always returns false - Stack Overflow
androidPermissions.PERMISSION.CAMERA) );. I always get hasPermission: false . I do not get any prompt for turning the permissions on.
Read more >
uses-feature and camera request in Ionic 6
I try to request camera permission, but it is not showing any prompt, and it always returns hasPermission = false. I'm currently using...
Read more >
Location Permissions and Accuracy: Ionic 4 | by Rajesh Mishra
The getCurrentPosition function will return the current position in latitude and longitude. Approach 2: Background Geolocation. This is really an awesome plugin ...
Read more >
Ionic 5 Complete guide on Geolocation, permission and auto ...
This Cordova/Phonegap plugin for Android and iOS to request ... But interestingly this method returns you the last known device location requested in...
Read more >
Cordova Android App Permission Management - YouTube
This video discusses how you can solve permission problems with Android in Cordova apps. There is a plugin that you can use to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found