transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.63k stars 426 forks source link

Invalid license Key #2147

Open dalexmolina opened 1 day ago

dalexmolina commented 1 day ago

Your Environment

useEffect(() => {

    BackgroundGeolocation.ready({

        desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
        distanceFilter: 30,
        //locationUpdateInterval: 5000,
        disableElasticity: true,
        stopTimeout: 5,
        debug: false, // <-- enable this hear sounds for background-geolocation life-cycle.
        logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
        stopOnTerminate: true,   // <-- Allow the background-service to continue tracking when user closes the app.
        startOnBoot: false,        // <-- Auto start tracking when device is powered-up.
        notification: {
            title: "Seguimiento de ruta",
            text: "Se esta compartiendo su posición"
        }

    }).then((state) => {

        if (!state.enabled) {
            setEnabledLocationService(true)
            console.log('=== SE CARGO SERVICIO ===')
        }

    }).catch(error => {
        console.warn('- BackgroundGeolocation error: ', error);
    });;

}, []);

=== app.json ====

"plugins": [ "@react-native-firebase/app", [ "react-native-background-geolocation", { "license": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } ], [ "expo-gradle-ext-vars", { "googlePlayServicesLocationVersion": "21.1.0", "appCompatVersion": "1.4.2" } ], "react-native-background-fetch" ]



## Expected Behavior
N/A

## Actual Behavior
Shows a notification with the error of "invalid license key"

![ImportedPhoto_1726752964367](https://github.com/user-attachments/assets/22bc6daf-a8f6-4192-898d-081014ef3633)

## Steps to Reproduce
Everytime the app starts

</details>
christocracy commented 1 day ago

Are you sure the license key you generated matches the Android package name defined in your app.json?

Did you completely follow the Setup Instructions and Re-build?

After running npx expo prebuild, you must run your Android app as follows:

npx expo run:android

See the Expo docs for Prebuild

dalexmolina commented 1 day ago

Yes, the name of the package was correct, but i'm using Expo EAS for the builds, also i followed the instructions..

christocracy commented 1 day ago

You're building development builds with eas build?

so you ran this?

 eas build --profile development
dalexmolina commented 1 day ago

Yes, also created a production build ( eas build --profile production ) and published it in an appstore for testing purposes and the message persists.

christocracy commented 1 day ago

I suggest you first build locally:

$ npx expo prebuild
$ npx expo run:android
dalexmolina commented 14 hours ago

I tried locally but the problem persists

christocracy commented 14 hours ago

Post the following files: