This object is in archive! 

DisplayData.sendDataSilent() not work anymore

Hubert shared this problem 5 years ago
Solved

Hi,


I'm still using (maybe an old API) with the function DisplayData.sendDataSilent(...) in an Eclipse IDE to show Points in Locus when moving the map. But this is not working anymore.

Is this function deprecated? What can I use instead?

Is there a new jar library like the locusaddonpubliclib.jar?


yours

Hubert

Replies (7)

photo
1

Good day Hubert,

this is really really really ... really very old API, not anymore published. Anyway, it should still work.

An alternative is a new API: GitHub: https://github.com/asamm/locus-api and alternative method to what you have used: https://github.com/asamm/locus-api/wiki/Display-points-on-a-map#send-points-by-sendbroadcast . Anyway, this API is best used with Android Studio & Gradle and if you have already working system, we may try to check it.

If you call mentioned function, does it start Locus Map? Is there anything that may help trace this problem? Also what about logcat? Do you see there any error message that may come from Locus Map app?

photo
1

Hi menion,

i have no experience with Android Studio, so i'm still using Eclipse. First Android Studio was awful.

I use the function only when moving the map, so Locus is already started.

DisplayData.sendData(Context context, PointsData data, boolean callImport) is still working perfect.

I just tested to start Locus with DisplayData.sendDataSilent(...), but Locus does not start.

I do not find a Error in LogCat.


Do not spend too much effort. maybe i have to try the actual Android Studio again.

photo
1

Hello,

this "silent" method most probably sends data over Broadcast, so sorry, my bad. It does not start Locus, but it has to be already running to correctly handle these silent events. Does it really stop working with latest update?

Because broadcasts since Android 8 have to define its target, so now it needs to look like this. You may see there defined "packageName" of the target application and this is definitely not happening in this really old API system.

If you may sacrifice a while, give a try to new Android Studio (it has it's problems, but it's really well usable) and give a try to new Locus API. It's not perfect, documentation is also not perfect, sorry for this, but you may try it and ask me if there will be any problem. I'll gladly help and also improve and update documentation if needed.

Thanks for understanding.

Menion

photo
1

thx a lot for your answer. I don't know exactly when it stopped working. I don't use this often. Update on Android 8 may be really be the reason.

What IDE do use use for Locus development?

photo
1

If you updated to Android 8, then this will be reason of this problem most probably, so there is no other chance, then use new API or write communication methods on your own (not recommended).

I, as probably all Android devs these days, use Android Studio ... not sure how long, maybe 5 - 6 years. Because it's based on really good IntelliJ platform, there are no more problems like were before ... at least not so serious :).

Good luck,

Menion

photo
1

I made the transfer to Android Studio. It was hard, but i finally made it. Much trying with imports etc. , but now my App is running again with silent sending my points to Locus.

Android Studio now is really much more stable than it was in my first try even when debugging. By switching to "Eclipse Keymap" now i can use it for coding as i am used to.

So you can close this task.

Maybe one more Question. Is Locus coded in Kotlin or in Java?

photo
1

Hello Hurbert,

perfect, I'm glad it works. As I wrote, documentation for API is not perfect, so really, if there will be any issues, I'll gladly help and if needed, improve docs.

And Java vs Kotlin, hmm ... we work on the app for almost 10 years and Kotlin, production ready, is here little more than 1.5 years as I know. So even if we try to use Kotlin quite a lot, we are somewhere around 20% code in Kotlin now and we paid a high price in the number of new bugs due to my fanatic tries to convert all to Kotlin :D.

Replies have been locked on this page!