Comments (19)
I can't actually test this since I don't have a device running Android 6 and due to this bug, I can't test it in the Android 6 emulator.
I've updated the example project to include a request location button, so could you test that on an Android 6 device and let me know the result?
I've also created a test project to illustrate the Android 6 emulator issue. This uses the latest versions of cordova-android (@5.0.1-dev) and cordova-plugin-geolocation (@2.0.0) which now includes code to request Android 6 runtime permission for location.
I'd be interested to know if you encounter the same runtime permissions problem with that project, since the runtime permissions logic in this plugin is based on that within these updated cordova packages.
from cordova-diagnostic-plugin.
Hi,
Ran it with the latest possible Cordova using Visual Studio - sorry for my large screenshots ( noticed it later)
Seems to be the same issue as i thought. I'll follow up tomorrow on possible dependency issues though. Eg. isn't the cordova-plugin-geolocation @1.0.1 ?
But currently, i have the same issues with that project. It says it's okay, but i receive an permission error when i'm using it.
from cordova-diagnostic-plugin.
The camera also doesn't seem to work, this is my android manifest ( for use with your app)
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="2" android:versionName="0.0.2" package="uk.co.workingedge.phonegap.plugins.example.diagnostic" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
</manifest>
If you have any advice on how i can help. I'd be happy to, cause i wouldn't know how to fix this.
from cordova-diagnostic-plugin.
Weird thing is, if i open up Google Maps, my "HIgh Location accuracy" is shared with my own Cordova app. I can't initiate it by itselve though. ( this could be because the apps minSdVersion is 22 to let geolocation work)
I also tested your android-debug.apk from bitbucket, which indeed requested the Android permissions. But the result i had was nothing ( i suppose):
The app on https://github.com/dpa99c/cordova-diagnostic-plugin-example/tree/master/build however, didn't want to install. ( yes, unknown sources is enabled :-) )
from cordova-diagnostic-plugin.
I've updated my Android 6.0 emulator to revision 9 (of "Google APIs Intel x86 Atom System Image") and now I'm having more success.
Camera permissions work fine: I'm able to request camera permissions and then take a photo.
With location, everything works apart from when current location is requested, the success (or error) callback is not called. However, after requesting location permissions, then requesting location, if I open Location Settings I can see that there is an entry under "Recent Location Requests" which would indicate that the application request for location was successful, but that the OS did not return a mock location back to the application - I will put this down to a bug in the Android emulator.
I've made a screen capture video demonstrating the above: http://ge.tt/api/1/files/5W2PMqS2/0/blob?download
from cordova-diagnostic-plugin.
Can this be closed?
from cordova-diagnostic-plugin.
Sorry for the late reply, didn't noticed it in my emails. But i will check it out. It surely looks good on the video though.
I have to admit, it doesn't happen a lot to see the person who's helping me out :) . It was a pleasant suprise ;-) ( in the video cast)
from cordova-diagnostic-plugin.
hi am facing the same problem in the gps...
can any one help me out....
thi\e bellow url is also not working
http://w812091.blob3.ge.tt/streams/5W2PMqS2/demo.wmv?sig=-VMi54sPQL9dcOUOjWoPeoScK2tnjaz0KZo&type=download
from cordova-diagnostic-plugin.
@sugir93 It's not clear what "the same problem in the gps" is and link you provided is invalid/broken.
Please provide useful information such as a detailed description, details of the build environment (local, Phonegap Build, etc.), runtime environment (Android version, device make/model), etc.
from cordova-diagnostic-plugin.
@dpa99c
message: application does not have sufficient geolocation permissions.
the above message am getting when am trying to access the location in high accuracy mode
from cordova-diagnostic-plugin.
@sugir93 if you use a recent version of cordova-plugin-geolocation it will request this permission for you.
To do so with this plugin use requestLocationAuthorization(), making sure you've added appropriate permissions to your manifest.
Without more details (e.g. code sample illustrating your usage), i cannot be more specific.
from cordova-diagnostic-plugin.
@dpa99c
yeah added all the codes in the manifest and in config aswell.
only this is happening in android 6.0 rest all its working.
the requestLocationAuthorization() is trowing undefined in all the devices, so i removed this function from my code.
and am using "cordova-plugin-request-location-accuracy" plugin aswell :-)
plz help me to fix this issue
from cordova-diagnostic-plugin.
the requestLocationAuthorization() is trowing undefined in all the devices, so i removed this function from my code.
This function works fine - see the example project for an example of usage on Android
plz help me to fix this issue
The only way I can help you further is if you paste all your relevant code somewhere I can see it, otherwise I'm just guessing.
from cordova-diagnostic-plugin.
@dpa99c
am using diagnostic 22 plugin...
will it be available in that version?
from cordova-diagnostic-plugin.
am using diagnostic 22 plugin...
will it be available in that version?
Does this mean you're using cordova.plugins.diagnostic.api-22
? Please be explicitly clear with your terminology.
If so, this branch of the plugin is intended for use with API 22 (Android 5.1) and below. Hence it does not support Android 6.0 runtime permissions so will not define functions such as requestLocationAuthorization()
for Android. You should only use this if you are building against API 22 or below.
If you wish to support Android 6.0 runtime permissions, you should use the master branch of the plugin which is available on NPM as cordova.plugins.diagnostic
, and make sure you are building against API 23.
from cordova-diagnostic-plugin.
@dpa99c cordova.plugins.diagnostic this plugin will support with the older devices then?
thanks for your support dpa99c
from cordova-diagnostic-plugin.
Yes, cordova.plugins.diagnostic will work fine on devices running older versions of Android.
Like any Android API, API 23 (Android 6.0) is backwardly compatible to devices running older versions. When you build your app containing cordova.plugins.diagnostic against API 23, the APK will still work fine on older versions of Android. The only difference is that any runtime permissions will automatically be returned as GRANTED since on older versions of Android, all permissions are granted at installation time.
from cordova-diagnostic-plugin.
thanks dpa99c (y)
from cordova-diagnostic-plugin.
@dpa99c
its working f9 nw :-)
Thank you very much for your help 👍
from cordova-diagnostic-plugin.
Related Issues (20)
- Build failed on Android HOT 1
- Android 13 - getLocationAuthorizationStatus() return WRONG statuses for ACCESS_COARSE_LOCATION in some cases HOT 2
- iOS: isMobileDataEnabled() not as documented/uses implementation for differend functionality HOT 2
- IOS - isCameraRollAuthorized return "[NSNull isEqualToString:]: unrecognized selector sent to instance" HOT 1
- When installing with lerna no dependency is added
- getBluetoothAuthorizationStatus wrong example HOT 2
- Workaround for Location Auth Status being DENIED_ALWAYS HOT 2
- isRequestingPermission() Always returns false for location
- Support Android 13/API 33 media storage permissions HOT 3
- Permission error HOT 1
- getExternalSdCardDetails for android 13 HOT 2
- No working POST_NOTIFICATIONS HOT 3
- getLocationAuthorizationStatus not working on android 13 with ionic cordova production builds HOT 1
- getBluetoothState() returns OK in SDK 33 even though bluetooth is not enabled/disabled HOT 1
- Android build Error HOT 2
- Storage permission Issue on Android after updating to API 33 HOT 2
- Android Permission for Notification asking in Runtime in Android 13 HOT 1
- cordova diagnostic plugin requestExternalStorageAuthorization is returning DENIES_ALWAYS HOT 1
- Android < 13 ACCESS_BACKGROUND_LOCATION is automatically granted despite it's not true HOT 1
- Specifying modules issue HOT 5
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-diagnostic-plugin.