Skip to content

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

@adeel399

Description

@adeel399

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions