Closed FatihAvs closed 1 month ago
Why are you posting this crash here to this repo?
Why are you posting this crash here to this repo?
because I think the crash is due to react native background location. There is no crash when the location is not active.
Your stacktrace does not reference this plug-in. If it did, there would be references to the symbolTSLocationManager
.
There are no references to this plug-in in your stacktrace. The plug-in is not at-fault.
Your stacktrace does not reference this plug-in. If it did, there would be references to the symbol
TSLocationManager
.There are no references to this plug-in in your stacktrace. The plug-in is not at-fault.
Could the distance filter being 50 m have increased resource usage at high speeds and caused a crash? Because we usually encounter this crash while driving at high speed on the highway.
Could the distance filter being 50 m have increased resource usage at high speeds
No. That’s not a low distanceFilter. 50 is what I’ve used for testing for the last 9 years. read the api docs Config.distanceFilter: distanceFilter is automatically increased based upon speed.
I also see references in your stacktrace to TTSSpeechThread
(text-to-speech).
Could the distance filter being 50 m have increased resource usage at high speeds
No. That’s not a low distanceFilter. 50 is what I’ve used for testing for the last 9 years. read the api docs Config.distanceFilter: distanceFilter is automatically increased based upon speed.
I also see references in your stacktrace to
TTSSpeechThread
(text-to-speech).
Thank you for your efforts for always providing help in every matter.
Your Environment
react-native -v
): 0.67.3import BackgroundGeolocation from 'react-native-background-geolocation'; import AsyncStorage from '@react-native-async-storage/async-storage'; const startBackgroundGeolocation = async () => {
BackgroundGeolocation.onLocation((location) => {
}, error => { console.warn("[location] ERROR: ", error); });
//useEffect(()=>{ //konumIzniİste(); //}) BackgroundGeolocation.onMotionChange(location => { console.warn("[motionchange] ", location); });
// This handler fires on HTTP responses BackgroundGeolocation.onHttp(response => { console.warn("[http] ", JSON.parse(response?.responseText)); var httpResponseFromMyServer = JSON.parse(response?.responseText); var httpResponseSevkiyatVarYok = httpResponseFromMyServer?.data?.sevkiyatVar; if(httpResponseSevkiyatVarYok!=null){ if(httpResponseSevkiyatVarYok==true){ console.warn("Aktif Sevkiyat Var, Konum güncellemelerine devam") } else if(httpResponseSevkiyatVarYok==false){ BackgroundGeolocation.stop(function () { console.warn("- Sevkiyat Yok Konum Almayı Durdur"); })
});
// This event fires when a change in motion activity is detected BackgroundGeolocation.onActivityChange(activityEvent => { console.warn("[activitychange] ", activityEvent); });
// This event fires when the user toggles location-services authorization BackgroundGeolocation.onProviderChange(providerEvent => { console.warn("[providerchange] ", providerEvent); });
//// // 2. Execute #ready method (required) // const userToken = await AsyncStorage.getItem("userToken") BackgroundGeolocation.ready({ httpRootProperty: 'coordData', notification: { title: "myapp", text: "location" }, // Geolocation Config url: "myapi/AddCordinatesToUserNew", headers: { "Authorization":
Bearer ${userToken}
, "content-type": "application/json" },}, (state) => { console.warn("- BackgroundGeolocation is configured and ready: ", state);
})
} export default startBackgroundGeolocation;
I EOF