I’m trying to implement background task on my application and it’s working well on iOS device but with Android,it returns [Unhandled promise rejection: Error: java.lang.Double cannot be cast to java.lang.Float]
error.
Code is quite simple like below and don’t know how to handle this error.
_startBackgroundTask = async () => {
await Location.startLocationUpdatesAsync(LOCATION_TASK, {
accuracy: Location.Accuracy.High,
distanceInterval: 3
})
}
[Unhandled promise rejection: Error: java.lang.Double cannot be cast to java.lang.Float]
- node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:146:31 in createErrorFromErrorData
- node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:95:30 in <unknown>
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:397:12 in MessageQueue.__invokeCallback
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:127:11 in <unknown>
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:297:8 in MessageQueue.__guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:126:9 in MessageQueue.invokeCallbackAndReturnFlushedQueue
* http://192.168.XXX.XX:19001/debugger-ui/debuggerWorker.js:72:58 in <unknown>