Skip to content
New issue

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

OSMAND crash when running api-demo #76

Open
fre391 opened this issue Apr 10, 2024 · 0 comments
Open

OSMAND crash when running api-demo #76

fre391 opened this issue Apr 10, 2024 · 0 comments

Comments

@fre391
Copy link

fre391 commented Apr 10, 2024

TARGET:

I would like to get information from Osmand as soon as a nav update is triggered.

IMPLEMENTATION:

  1. 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) }

  2. And for testing purpose modify the onActivityResult to
    //showOsmandInfoDialog(sb.toString()) Toast.makeText(this@MainActivity, sb.toString(), Toast.LENGTH_SHORT).show()

  3. 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

@fre391 fre391 changed the title OSMAND crash when starting api-demo OSMAND crash when running api-demo Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant