Geolocation doesn't work

Hi, i have a problem in geolocation, currently i am running on ionic 4.12,I install apk on android 6 and 9 and it is working fine, but when i install it on android 4.4 and 5 the geolocation is not working, there is no return value.

please help

So a few things…

  1. Why can’t guess what the issue is. Could you recreate it in a sample project and push that to github?
    Or at least share some code.
  2. Android 4.4 is not supported. This is not really relevant to your current issue, but something to keep in mind.
import { Component, OnInit } from '@angular/core';
import { Geolocation } from '@ionic-native/geolocation/ngx';

  selector: 'app-test-loc',
  templateUrl: './',
  styleUrls: ['./'],
export class TestLocPage implements OnInit {
  constructor(private geolocation: Geolocation) {}

  ngOnInit() {

  lat: any;
  lng: any;

  geogeo() {
      .then((resp) => {
        console.log(resp.coords.longitude); = resp.coords.latitude;
        this.lng = resp.coords.longitude;
      .catch((error) => {

Hi, mhartington, i need your help ?

Try something like this…

  ngOnInit() {
   return this.geogeo();

 geogeo() {
    return this.geolocation

You basically are not unwrapping the promise correctly which could lead to various issues.

Ok, thank you very much.