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

Crash when trying to open on WearOS device #1655

Closed
erebion opened this issue May 3, 2024 · 4 comments · Fixed by #1656
Closed

Crash when trying to open on WearOS device #1655

erebion opened this issue May 3, 2024 · 4 comments · Fixed by #1656

Comments

@erebion
Copy link

erebion commented May 3, 2024

Hey there,

I know Etar does not really support WearOS at all, but I thought this might be interesting anyway.

Etar immediately crashes on a WearOS 4 device:

05-03 12:32:35.649  3095  3095 E AndroidRuntime: FATAL EXCEPTION: main
05-03 12:32:35.649  3095  3095 E AndroidRuntime: Process: ws.xsoh.etar, PID: 3095
05-03 12:32:35.649  3095  3095 E AndroidRuntime: java.lang.IllegalStateException: android.os.ServiceManager$ServiceNotFoundException: No service published for: search
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.app.Activity.ensureSearchManager(Activity.java:7045)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.app.Activity.getSystemService(Activity.java:7059)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at com.android.calendar.Utils.setUpSearchView(Utils.java:1432)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at com.android.calendar.AllInOneActivity.onCreateOptionsMenu(AllInOneActivity.java:858)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.app.Activity.onCreatePanelMenu(Activity.java:4343)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at androidx.activity.ComponentActivity.onCreatePanelMenu(ComponentActivity.java:520)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at androidx.fragment.app.FragmentActivity.onCreatePanelMenu(FragmentActivity.java:287)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu(WindowCallbackWrapper.java:95)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onCreatePanelMenu(AppCompatDelegateImpl.java:3429)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:458)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:58)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1231)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:899)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:827)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:942)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7898)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: Caused by: android.os.ServiceManager$ServiceNotFoundException: No service published for: search
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.os.ServiceManager.getServiceOrThrow(ServiceManager.java:166)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.app.SearchManager.<init>(SearchManager.java:561)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	at android.app.Activity.ensureSearchManager(Activity.java:7043)
05-03 12:32:35.649  3095  3095 E AndroidRuntime: 	... 23 more

However, before it crashes, it briefly shows the calendar.

I'm pretty convinced that even though WearOS is not specifically supported, addressing this would make it at least somewhat usable. And also provide a way to look at a calendar without syncing via Google, as currently there is no other way to even look at other calendars (for example synced via DAVx5), as there are no apps that support that. (Believe me, I've looked at every single WearOS calendar app and could not find anything.)

@Gitsaibot
Copy link
Contributor

We don't support WearOS but I had a short look and it seems that the search service isn't available on WearOS. I quickly tried to prevent the error so that etar does not crash. Try the debug.apk in the link but no guarantee that it will work.
app-debug.zip

@erebion
Copy link
Author

erebion commented May 3, 2024

Try the debug.apk in the link but no guarantee that it will work.

Wow, that works already!

Finally an app that can display a non-Google calendar on WearOS. \o/

I'll play around a bit more and see if I notice any other crashes, if so I will comment again here. :)

We don't support WearOS

I know! But it works now. Of course, it is a bit fiddly, but now there is a way to look at a calendar (without using Google). I'd rather have something fiddly than nothing at all. :)

Even if you don't support it officially, it'd be really great if the fix could be included for other people that don't mind not having a watch-friendly layout. :)

@erebion
Copy link
Author

erebion commented May 3, 2024

I'll play around a bit more and see if I notice any other crashes, if so I will comment again here. :)

No matter what I do, for now it all seems to work just fine. :D

@erebion
Copy link
Author

erebion commented May 3, 2024

image

This is how it looks like. This is enough to see what the next appointment is.

If I turn down screen density via ADB, I can see a bit more. Good enough for what you would want on a watch: Seeing what's next. :)

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

Successfully merging a pull request may close this issue.

2 participants