Hi, I want to be able to display fullscreen notifi...
# compose-wear
f
Hi, I want to be able to display fullscreen notification to display to the user when he reaches a km while running. I noticed that Samsung does it with their app. I haven't found how they do it maybe you have more information about it. On mobile, you can by adding a fullscreenIntent to a notification but that doesn't seems to work on wear. Apparently it was possible to add an extend to a notification with a WearableExtender() but that has been removed on wear os 2.0 and doesn't do anything anymore. Was it replaced by something?
I think Samsung uses SYSTEM_ALERT_WINDOW permission but that doesn't exist on non Samsung wear devices
f
Yeah, on my samsung galaxy watch 5 pro i'm using that permission in my timer app. Moreover, i'm using a notification system (a background service) to trigger the broadcast receiver. In the broadcast receiver i have:
Copy code
val notificationIntent = Intent(context, FullScreenActivity::class.java)
notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
context.startActivity(notificationIntent)
k
Have you tried setting full screen intent with https://developer.android.com/reference/android/app/Notification.Builder#setFullScreenIntent(android.app.PendingIntent,%20boolean) ? Though, at the moment this should work only on Samsung devices
👀 1
SYSTEM_ALERT_WINDOW is not recommended approach for multiple reasons, including this issue: https://issuetracker.google.com/245716314 for getting relevant permission
f
Yes I saw that this permission is quite shady 😁. I have tried the full screen intent on my Samsung watch 4, it wasn't working as well as for the pixel watch and the wear os 4 emulator. I don't get why that 's not implemented isn't it required if you receive a call on your watch?
f
OT: @Kseniia Shumelchyk ok, that's the reason why my app was rejected few weeks ago (in play store), because there's no ui for that permission on non samsung device lol @florent Full screen intent didn't work for me too in the past on physical device, not all the times...i tought that was a battery optimization problem, but i wasn't sure...and so i was using SYSTEM_ALERT_WINDOW, that worked at 100%
f
I got a test repo if you want to try yourself https://github.com/CoreFloDev/fullscreenintentexample. I also found that issue yesterday https://issuetracker.google.com/u/1/issues/237187555 but unless doing a tumbs up, you can't do much and it is P3 so it probably will never be resolved 😞
😓 1
k
Thanks Florent, I’ll surface your issues with Wear notification team. FSIN won’t work on Wear 4 emulator and Pixel watch yet, and it does require a certain minimum Samsung build. If you have time can you also share build/sysui versions and ideally a bugreport from your watch? FYI @Garan Jenkin
@FEDUSS sorry to hear, yeah likely related to this issue, SAW permissions in most cases could not be auto-granted
@florent @FEDUSS I wonder what are your use cases for using FSIN / SAW?
f
@Kseniia Shumelchyk yeah, in my app there's a disclaimer page (before the real app itself) with a button, that starts an intent to SAW permission UI
i'm using SAW to display a timer expiration notification with differents options (it's a tomato timer app)...previously i was using a FSIN, but didn't work every time, idk why...it was random
here's my public repo...it's an open source project, since it's my first compose app: https://github.com/feduss/Tomatimer
👍 1
f
I want to use FSIN to display the time it took you to run your last km or the time it took you to swim your last laps. It depends of the sport, but that's to give a felling of progress to the user while he has his screen off it as he probably doesn't want to loose a lot of battery
🚀 1
👍 1
f
any news?
f
I don't think it is gonna be that fast 😁
🥲 1
k
I filed an issue when we spoke last time, but yeah still under investigation w/ Samsung, sorry :/
😓 1
492 Views