We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am getting No task registered for key BackgroundGeolocation for background location tracking.
No task registered for key BackgroundGeolocation
Source Code
import {StyleSheet, Text, View} from 'react-native'; import React, {useEffect} from 'react'; import Radar from 'react-native-radar'; const App = () => { const doSetup = async () => { Radar.initialize('prj_test__________________'); Radar.setUserId('1234567'); Radar.setLogLevel("info"); }; const handlePermisions = async () => { // request foreground location permissions Radar.requestPermissions(false) .then(status => { // request background location permissions Radar.requestPermissions(true) .then(status => { // do something with status }) .catch(err => { // optionally, do something with err }); }) .catch(err => { // optionally, do something with err }); }; const trackUserLocationInFoprground = async ()=> { Radar.trackOnce().then((result) => { // console.log({result}) }).catch((err) => { console.log(err) }); } const trackLocationInBackground = async () => { Radar.startTrackingContinuous(); } const registerListeners = () => { Radar.on('clientLocation', (result:any) => { console.log(JSON.stringify({ event: 'clientLocation', result }, null, 2)); }); Radar.on('location', (result:any) => { console.log(JSON.stringify({ event: 'location', result }, null, 2)); }); Radar.on('events', (result:any) => { console.log(JSON.stringify({ event: 'events', result }, null, 2)); }); Radar.on('error', (err:any) => { console.error(JSON.stringify({ event: 'error', err }, null, 2)); }); }; useEffect(() => { doSetup(); handlePermisions(); trackUserLocationInFoprground() trackLocationInBackground() }, []); return ( <View style={styles.container}> <Text>Test Radar SDK</Text> </View> ); }; export default App; const styles = StyleSheet.create({ container: { display: 'flex', flex: 1, alignItems: 'center', justifyContent: 'center', }, });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am getting
No task registered for key BackgroundGeolocation
for background location tracking.Source Code
The text was updated successfully, but these errors were encountered: