apache / apache/cordova-plugin-geolocation

Geolocation working on android 13,14 even 8 but not on android 12 function does not call no error in console

Open
#273 18 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
646
Forks
654
PR merge metrics
No merged PRs in 30d

Description

# Bug Report

## Problem

### What is expected to happen?
Geolocation should give current location in all android devices

### What does actually happen?
but it is working in many devices except android 12 there is no error msg at all function does not even call

## Information

### Command or Code

this.geolocation.getCurrentPosition().then(async (resp:any) => {

this.lat=resp.coords.latitude;
this.long=resp.coords.longitude;
alert("lat:"+this.lat+"long"+this.long);
}).catch((error:any) => {
console.log('Error getting location', error);
alert("location error:"+error);
});

### Environment, Platform, Device

Android 12 ionic capacitor

### Version information

## Checklist

- [x ] I searched for existing GitHub issues
- [x ] I updated all Cordova tooling to most recent version
- [ x] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the provided getCurrentPosition() call on Android 12 with the listed Cordova geolocation and Awesome Cordova Plugins versions, then compare it with the working Android versions. Trace whether the success or error callback is reached and document the required change; done means location requests produce a result or a reported error on Android 12.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.