Closed menion closed 3 years ago
Update to Locus API done in commit to dev/update branch.
Am I correct that this doesn't compile yet? Or did I do something wrong?
I'm interested to see what TargetSdk 30 will do to the WearableDrawerView, with Samsung's quick settings panel in WearOS 3.0 effectively breaking the drawer pulled in from the top.
Hi Marek, I've tested the "wear" module yesterday and it worked on the emulator correctly.
You probably miss parameters for signing necessary in the Gradle script.
I've updated the old Locus API wiki ... so here are steps to set this up. Let me know if it helps.
Hi Menion, I came across a few classes that still referenced old library components such as "ActionTools". Will double-check that I set it up correctly. Thanks!
Update - the errors are in the "device" module (DeviceCommService and PeriodicUpdateReceiver). The "wear" module compiles fine and runs on the emulator. However I cannot connect it to the main app anymore (which worked before).
Thank you Marek! I'll check it more carefully, hopefully, today, and let you know here.
I believe that updating the whole project to the latest versions is necessary before continuing in any development.
Uff, the app now compile and start. But seems there is a new different problem. Created device APK does not contain necessary DeviceCommService
and DeviceListenerService
objects. Hmm ...
Interesting, I'm getting a different error and a crash from "device":
Process: com.asamm.locus.addon.wear, PID: 29813
java.lang.RuntimeException: Unable to instantiate application com.asamm.locus.addon.wear.MainApplication: java.lang.ClassNotFoundException: Didn't find class "com.asamm.locus.addon.wear.MainApplication" on path: DexPathList[[zip file "/data/app/~~HVQSrOHb89theKV4LHbELA==/com.asamm.locus.addon.wear-2SbCvNZnYJ4TwJVaj2eQZw==/base.apk"],nativeLibraryDirectories=[/data/app/~~HVQSrOHb89theKV4LHbELA==/com.asamm.locus.addon.wear-2SbCvNZnYJ4TwJVaj2eQZw==/lib/x86, /system/lib, /system_ext/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:1244)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6683)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.asamm.locus.addon.wear.MainApplication" on path: DexPathList[[zip file "/data/app/~~HVQSrOHb89theKV4LHbELA==/com.asamm.locus.addon.wear-2SbCvNZnYJ4TwJVaj2eQZw==/base.apk"],nativeLibraryDirectories=[/data/app/~~HVQSrOHb89theKV4LHbELA==/com.asamm.locus.addon.wear-2SbCvNZnYJ4TwJVaj2eQZw==/lib/x86, /system/lib, /system_ext/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:76)
at androidx.core.app.CoreComponentFactory.instantiateApplication(CoreComponentFactory.java:52)
at android.app.Instrumentation.newApplication(Instrumentation.java:1158)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1236)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6683)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
W/System: A resource failed to call close. ```
You are fast. Hmm, I've just before commit also change MainApplication
from Java to Kotlin and now you have this error. This is a clue, thanks :).
Haha I was just looking through the code when your commit came in. Locus Map is literally the reason I own a smartwatch so this is exciting. :)
So, both modules are now working and communication between them should be finally working as well. Uff ...
Seems that dirty work should be done. So if you are still interested, it is time to play ;).
I currently do not have time for active work on this add-on, but I'll be available as much as possible for possible questions or PR reviews. Thanks for your interest btw!
Yup, got it working in the emulator! I'll have a play with it and see how far I get.
No worries, thanks for putting in that extra work, and thanks for a great app!
Before further development, it is necessary to update to latest libs used by this project.
The best should be to check current Wear OS requirements.
What definitely needs to be done: