You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to get information from Osmand as soon as a nav update is triggered.
IMPLEMENTATION:
So the idea was to change the ApiActionType in MainActivity to: ApiActionType.AIDL_REGISTER_FOR_NAV_UPDATES -> { aidlHelper.setNavigationInfoUpdateListener(object : OsmAndAidlHelper.NavigationInfoUpdateListener { override fun onNavigationInfoUpdate(directionInfo: ADirectionInfo?) { runOnUiThread { val text = "NavigationInfoUpdate" Toast.makeText(this@MainActivity, text, Toast.LENGTH_SHORT).show() mOsmAndHelper!!.getInfo() } } }) callbackKeys[KEY_NAV_INFO_LISTENER] = aidlHelper.registerForNavigationUpdates(true, 0) }
And for testing purpose modify the onActivityResult to //showOsmandInfoDialog(sb.toString()) Toast.makeText(this@MainActivity, sb.toString(), Toast.LENGTH_SHORT).show()
Rest of the demo api remains the same, except
private static final String OSMAND_PACKAGE_NAME = OSMAND_FREE_PACKAGE_NAME;
RESULT:
If the demo app is started it first works as expected, but after a while (sometimes after minutes) a crash in OSMAND appears. Please refer to the exception.log I send per email.
Device : r8q
Brand : samsung
Manufacturer : samsung
Model : SM-G781B
Product : r8qxeea
Build : TP1A.220624.014.G781BXXS9HXA6
Version : 13
App Version : OsmAnd
Apk Version : 4.7.7 4707
Hope to get your feedback on this soon...As I also have started a more complex open community app at https://github.com/fre391/OsmAndHud (UNDER DEVELOPMENT!) , which also leads into the same error after a while....
Good luck and thank you very much for this nice piece of software....
Markus
The text was updated successfully, but these errors were encountered:
fre391
changed the title
OSMAND crash when starting api-demo
OSMAND crash when running api-demo
Apr 10, 2024
TARGET:
I would like to get information from Osmand as soon as a nav update is triggered.
IMPLEMENTATION:
So the idea was to change the ApiActionType in MainActivity to:
ApiActionType.AIDL_REGISTER_FOR_NAV_UPDATES -> { aidlHelper.setNavigationInfoUpdateListener(object : OsmAndAidlHelper.NavigationInfoUpdateListener { override fun onNavigationInfoUpdate(directionInfo: ADirectionInfo?) { runOnUiThread { val text = "NavigationInfoUpdate" Toast.makeText(this@MainActivity, text, Toast.LENGTH_SHORT).show() mOsmAndHelper!!.getInfo() } } }) callbackKeys[KEY_NAV_INFO_LISTENER] = aidlHelper.registerForNavigationUpdates(true, 0) }
And for testing purpose modify the onActivityResult to
//showOsmandInfoDialog(sb.toString()) Toast.makeText(this@MainActivity, sb.toString(), Toast.LENGTH_SHORT).show()
Rest of the demo api remains the same, except
private static final String OSMAND_PACKAGE_NAME = OSMAND_FREE_PACKAGE_NAME;
RESULT:
If the demo app is started it first works as expected, but after a while (sometimes after minutes) a crash in OSMAND appears. Please refer to the exception.log I send per email.
Device : r8q
Brand : samsung
Manufacturer : samsung
Model : SM-G781B
Product : r8qxeea
Build : TP1A.220624.014.G781BXXS9HXA6
Version : 13
App Version : OsmAnd
Apk Version : 4.7.7 4707
Hope to get your feedback on this soon...As I also have started a more complex open community app at https://github.com/fre391/OsmAndHud (UNDER DEVELOPMENT!) , which also leads into the same error after a while....
Good luck and thank you very much for this nice piece of software....
Markus
The text was updated successfully, but these errors were encountered: