pguyot / Einstein

NewtonOS running on other operating systems
GNU General Public License v2.0
415 stars 56 forks source link

Android Q lacks App Menu #68

Open jwise-mfg opened 4 years ago

jwise-mfg commented 4 years ago

Basic Information

Description of issue

App menu cannot be invoked, because no App icon appears. The app itself runs fine, but the application menu is not visible.

Expected behavior

Expected behavior documented here: https://rkixmiller.dudaone.com/old-hardware-emulated-einstein-emulating-the-apple-newton-part-3

Steps to reproduce issue

Screenshot_20191209-103549

codepoet80 commented 4 years ago

This seems to be related: https://stackoverflow.com/questions/16045722/android-notification-is-not-showing

codepoet80 commented 4 years ago

Confirming, that adding a notification channel (per SO article above) fixes the problem -- however, I'm not sure if I've implemented this in a backward compatible fashion. Add the below to the raisePriority method of EinsteinService.java

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { String channelId = "EinsteinEmulator"; NotificationChannel channel = new NotificationChannel(channelId, "Einstein Emulator", NotificationManager.IMPORTANCE_DEFAULT); mNM.createNotificationChannel(channel); mBuilder.setChannelId(channelId); }

Also, replace the last line of the method startForeground(0x4e256cc5, mBuilder.build()); with: mNM.notify(0x4e256cc5, mBuilder.build());

daemonspudguy commented 4 years ago

The menu is non-existent over here on 9 as well.