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
Good afternoon! In the simple mode of the application, everything works well. Permissions have already been requested and received.
Now I want the Headless (https://reactnative.dev/docs/headless-js-android) script to work with coordinates, but I always get null
Here are excerpts from the code:
index.js
... import { BackgroundTask } from './src/utils/BackgroundHeadlessJSTask'; AppRegistry.registerHeadlessTask('Sync', () => BackgroundTask); AppRegistry.registerComponent(appName, () => App);
BackgroundHeadlessJSTask.js
export const BackgroundTask = () => { Geolocation.getCurrentPosition( (position) => { console.log('position', position); }, (error) => { // error.code: 3 // error.message: Location request timed out. console.log(error); }, { timeout: (1000 * timeout), maximumAge: (1000 * 60 * 2), enableHighAccuracy: true, } ); };
After analyzing the situation, I began to receive an error: Location request timed out.
I do not know what to do...
The text was updated successfully, but these errors were encountered:
Good afternoon! In the simple mode of the application, everything works well. Permissions have already been requested and received. Now I want the Headless (https://reactnative.dev/docs/headless-js-android) script to work with coordinates, but I always get null Here are excerpts from the code: index.js ... import { BackgroundTask } from './src/utils/BackgroundHeadlessJSTask'; AppRegistry.registerHeadlessTask('Sync', () => BackgroundTask); AppRegistry.registerComponent(appName, () => App); BackgroundHeadlessJSTask.js export const BackgroundTask = () => { Geolocation.getCurrentPosition( (position) => { console.log('position', position); }, (error) => { // error.code: 3 // error.message: Location request timed out. console.log(error); }, { timeout: (1000 * timeout), maximumAge: (1000 * 60 * 2), enableHighAccuracy: true, } ); }; After analyzing the situation, I began to receive an error: Location request timed out. I do not know what to do...
any solution?
Sorry, something went wrong.
I fixed the problem in the fork of this library. You can use it. https://github.com/valery-lavrik/react-native-geolocation
No branches or pull requests
Good afternoon! In the simple mode of the application, everything works well.
Permissions have already been requested and received.
Now I want the Headless (https://reactnative.dev/docs/headless-js-android) script to work with coordinates, but I always get null
Here are excerpts from the code:
index.js
BackgroundHeadlessJSTask.js
After analyzing the situation, I began to receive an error:
Location request timed out.
I do not know what to do...
The text was updated successfully, but these errors were encountered: