Open Naveenkumar-1411 opened 1 month ago
here is the image i have uploaded
please some do needfull
If the method doesn't exist, then your app things the plugin is not installed.
Also, you completely ignored the required issue template so I don't even know anything about your setup.
react-native -v
):PASTE_YOUR_CODE_HERE
1. 2. 3. 4.
"react-native": "0.74.1",
platform :Android,
os Version: Android13,14,
Device ,Vivo y021,iqoo Z7
plugin version:
expo-gradle-ext-vars": "^0.1.2",
"react-native-background-fetch": "^4.2.5",
"react-native-background-geolocation": "^4.16.5",
plugin config:
[
"react-native-background-geolocation",
{
"license": "my license"
}
],
[
"expo-gradle-ext-vars",
{
"googlePlayServicesLocationVersion": "21.1.0",
"appCompatVersion": "1.4.2"
}
],
"react-native-background-fetch"
],
See the last section of Setup Instructions named "Re-build".
whether i need to prebuild and then work on it
After adding the plug-in, you must “prebuild” or the plug-in doesn’t exist.
Wheter i need to convert my Expo App into the native cli
or eas build
if i make eas build how it work if i need to make both Apple and Andoid build it requires Apple id
This issue is stale because it has been open for 30 days with no activity.
import React, { useState, useEffect } from 'react'; import { View, Button, Alert, StyleSheet } from 'react-native'; import BackgroundGeolocation from 'react-native-background-geolocation'; import Constants from 'expo-constants'; import * as Application from 'expo-application'; import axios from 'axios'; import BASE_URL from '../../../../utils/Api'; import { useDispatch, useSelector } from "react-redux"; const Homeview = () => { const [isTracking, setIsTracking] = useState(false); const [deviceUuid, setDeviceUuid] = useState('');
const loginUser = useSelector((state) => state.user.user); const employee_id = loginUser.profile.id;
useEffect(() => { // Get the device unique ID const fetchDeviceUuid = () => { const uuid = Constants.platform.android ? Application.getAndroidId() : Constants.installationId; setDeviceUuid(uuid); };
}, [deviceUuid]);
const startTracking = () => { BackgroundGeolocation.ready({ desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH, distanceFilter: 50, stopOnTerminate: false, startOnBoot: true, debug: false, logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, }, (state) => { if (!state.enabled) { BackgroundGeolocation.start(); } });
};
const stopTracking = () => { BackgroundGeolocation.stop(); setIsTracking(false); };
return (
); };
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', }, });
export default Homeview; this is my code i getting the error that Backgroundgeolocation type error cannot read the ready the property ready of null start of the null stop of the null