EddyVerbruggen / nativescript-directions

:point_up_2: :point_right: :point_down: :point_left: Open the Maps app to show directions to anywhere you like
MIT License
83 stars 21 forks source link

Directions.available bug #47

Open Jonathan64340 opened 2 years ago

Jonathan64340 commented 2 years ago

Hello everybody,

Today I'm working on a navigation app, and we use @nativescript/directions 2.0.2.

Since our last upgrade, Directions.available() returns false, but it should return true, and when (for testing) we call directly Directions.navigate(), the navigation app opens correctly.

let directions = new Directions();
directions.available().then(available => {
    console.log({ available })             // return false
    if (true) {                            // force to enter and it
        directions.navigate({              // it works despite the available = false !!!
            to: {
                lat: parseFloat(this.totem.latitude),
                lng: parseFloat(this.totem.longitude),
            }
        }).then(() => { }, () => {
            GlobalService.toast(localize('app.gps_unavailable'));
        });
    } else {
        GlobalService.toast(localize('app.gps_unavailable'));
    }
});

Can you help me please ? Best regards

alexdomingues commented 1 year ago

I'm having the same problem on android emulator and android real device with the same version of directions. For iOS it's working fine in emulator.