• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Themes / Apps / Mods SamSprung Cover Screen Launcher

Search This thread
This is a WIP launcher for the cover screen that allows you to run apps without opening the phone.

This is primarily useful for checking recent messages, running background tasks, or performing actions that do not require a keyboard or the full screen.

Current limitations:
  • Apps require Screen lock type set to None / Swipe in Settings -> Lock screen
    • Bixby unlock can be used as a workaround for other lock types

  • Keyboards will not open on the cover screen and some app functionality is limited
    • Firmware limitation by Samsung - Secondary IME support is disabled

  • Switching apps requires tapping power and waiting for at least two seconds to close the app before launching the widget again (turn on cover, swipe to widget). The app list, however, can be swiped closed.

  • Samsung Health must be uninstalled to free up the package name for the whitelisted widgets. Installing this app will then add it as an option in the cover screen widgets.
    • Firmware limitation by Samsung - Widget package name or signature




This app replaces Samsung Health and will not work with any other app that requires uninstalling Samsung Health.​


Thanks @CarudiBu for discovering the workaround to load a custom widget.
 
Last edited:

M4-NOOB

Senior Member
Aug 7, 2011
55
17
I think I'm a bit stupid, but I can't find the apk? I see the build and the 7.29MB ZFlip-Launcher-dee2c10 but no way to download
 

Attachments

  • Screenshot_20210904-104551_Firefox Nightly.png
    Screenshot_20210904-104551_Firefox Nightly.png
    138.8 KB · Views: 578

M4-NOOB

Senior Member
Aug 7, 2011
55
17
Which apps have you gotten to work so far? Weirdly enough for me it was only the camera (with tiny cutout of the app, but it starts). No settings/gallery/contacts/maps/gmail/whatsapp and many other apps I tried. When tapping on them it just freezes and I have to press the power button the turn off the cover screen again. I do see them in the recent apps though, they just don't show on the cover screen. Just updated to the latest build, but same results besides not seeing them in recent apps anymore
 

HDCowboy

Senior Member
Dec 20, 2011
75
10
Interesting, just got my Flip a couple days ago and although I would hate too uninstall Samsung Health, I'm curious if you would be able to watch a little mini Youtube video on the cover screen with this app, has anyone tried it?
 
  • Like
Reactions: Benwah
I updated the limitations list to document some of the current issues and how to work around them.
Until there is a proper API for cover widgets, some of them may be unavoidable (ie. keyboard)

Interesting, just got my Flip a couple days ago and although I would hate too uninstall Samsung Health, I'm curious if you would be able to watch a little mini Youtube video on the cover screen with this app, has anyone tried it?

Yes, videos do appear to work in the YouTube app, sound and all.
 
  • Like
Reactions: HDCowboy
Edit: FIXED. (Mostly)

If you open the screen with an app running on the cover, it will resume. If you tap power while running an app on the cover, it will add the app to recent tasks and resume it normally when opening the screen.

Some apps still burn out (ie Firefox) and don't always launch. It's rare, but still worth looking into to avoid the inconvenience.
 
Last edited:
For those who installed a previous version ("Remove unused activities and resources" or earlier):

You may need to uninstall to install the newest version. This is part of an effort to get this widget running alongside the Samsung Health app (or a slightly modified version of it).

In theory, using a 'sharedUserId' will allow two apps to exist with shared resources, as long as they are signed with the same signature. Since Samsung Health can be uninstalled (making it a user app), it should be possible to use the signature from this widget and the sharedUserId to make a modified version of the app without the widget that will run alongside it.
 

M4-NOOB

Senior Member
Aug 7, 2011
55
17
Not sure why, but I can't start any app, it's just freezing the cover screen when tapping on an app. No app worked. Restarted the phone then the camera was working (as in previous versions), sadly no other app still.. Also reinstalled and rebooted but no help.
 

CarudiBu

Member
Aug 29, 2021
12
28
Geneva, Switzerland
From what I've seen testing launching some apps on the cover screen, apps need the
XML:
<meta-data android:name="com.samsung.android.activity.showWhenLocked" android:value="true"/>
manifest attribute in each of the activities you want to launch to allow them to be launched while the phone is locked. Otherwise, any activities launched while the phone is closed are queued to open on the main screen once the phone is unlocked.
 
  • Like
Reactions: M4-NOOB

Top Liked Posts

  • 2
    I don't know how much more can really be done inside the limitations Samsung placed on the cover screen. It may be as close as it's going to get until they lighten up.
    In my opinion, there's not much more that really needs to be done. This launcher has made the cover screen almost as functional as the larger Moto RAZR 5g cover screen. We can also use workarounds for some of the limitations. For example, I press and hold the power button, then release it while keeping my finger on the fingerprint scanner to unlock the phone. We don't have to remove the screen lock for the launcher (you already made us aware of the screen lock workaround). I also configured bixby dictate to initiate using the power button as a workaround to not having keyboard functionality on the cover screen. I use this method to "type" in any text field. So, for example, I can open my messaging app on the cover screen, and create a new text message or respond to a text message without opening the phone. This works in just about ANY text field in ANY app. This launcher delivered a huge jump in cover screen functionality.
  • 5
    Widgets on the cover screen are granted Settings.canDrawOverlays without the need for permission approval from the user?

    With the option off in the app settings, the app never requested the permission and instead simply verified that it was already granted. That is interesting...

    and now the big news:

    Portrait apps may now be fully functional, if my testing is correct.


    The permission approval button when launching the app from the drawer shouldn't be required, but it exists in case it will help with any finicky apps / devices. It will request system settings and overlay permissions.

    System settings permission will allow the widget to temporarily disable the automatic rotation option, while the overlay permission creates a fake view over the widget that is locked in portrait and steals focus from the widget to avoid it forcing the layout back to landscape. This will not, however, prevent apps with landscape support from functioning normally.

    A new caveat I found is that, when charging, tapping power and waiting won't exit the current app. I do not intend to address this right now. The reason being that the controls to have the power button return to the widget also force a screen timeout to return to the widget and can cause issues with the app being displayed when opening the phone.

    A quick and dirty workaround to change apps when charging is to simply open the phone a bit. This will reset the widget without breaking the expected functionality.

    As it stands, the power button and a timeout will not kill the current app unless they exceed two seconds and will not kill the app at all when charging. This allows long-term use of a single app, which fits most use cases. Other options to switch apps, such as volume button overrides, are also being explored.

    @ChrisChoi314 it appears your list of incompatible apps was lost in the cleanup. If you still find any, you can post the list on the issue for it.

    3
    Except I'm using swipe or no lock screen(both supported configs according to your OP) and the bug is occuring

    Sounds like you should relearn how to read instead of blaming the user for reporting a bug with your app because I clearly stated that I disabled the lockscreen entirely and still couldn't launch apps without either restarting the phone or removing the widget and enabling it again

    It's not my job to bug report for you, I'm doing you a favor by telling you about it, don't be rude and blame me for experiencing a bug you wrote into the code...

    I'm trying to understand your issue to fix it. I'm not obligated to release free software or provide you with any support at all. If you choose not to report a bug and you're the only one that appears to be facing it, how much are you hurting anyone else?
    2
    Thanks to whoever made the YouTube video. I have been working on improving the initial startup / return loading. It shouldn't require a restart. That is definitely inconvenient. I don't believe it does now, but I will start throwing that into the testing.

    The next big feature planned is to try prioritizing apps with notifications. This will likely be second to adding some form of indicator.
    2
    I don't know how much more can really be done inside the limitations Samsung placed on the cover screen. It may be as close as it's going to get until they lighten up.
    In my opinion, there's not much more that really needs to be done. This launcher has made the cover screen almost as functional as the larger Moto RAZR 5g cover screen. We can also use workarounds for some of the limitations. For example, I press and hold the power button, then release it while keeping my finger on the fingerprint scanner to unlock the phone. We don't have to remove the screen lock for the launcher (you already made us aware of the screen lock workaround). I also configured bixby dictate to initiate using the power button as a workaround to not having keyboard functionality on the cover screen. I use this method to "type" in any text field. So, for example, I can open my messaging app on the cover screen, and create a new text message or respond to a text message without opening the phone. This works in just about ANY text field in ANY app. This launcher delivered a huge jump in cover screen functionality.
    2
    Yes. I even tried hitting the power button and then leaving my phone cover screen off for about half an hour but when I eventually turned the cover screen back on it was still in the current app, even with my phone off the charger. I consistently get the same result no matter how long I wait.

    I did a number of other things to try to rectify the issue - I made sure the permissions were approved (allow app on top and allow app to change system settings), I cleared the launcher's cache and data, I performed a soft reset, I uninstalled and re-installed the launcher, I went into the phone's recovery mode and wiped the phone's cache, and did an app repair (re-optimizing all apps on my phone). Beside doing each of these things, the power button and timeout still does not kill the current app on the cover screen.

    Alright, well it shouldn't be long as on a secondary "exit button" and I'll see if I can replicate that in the process.

    After a long look into possibilities, it seems like the power handling is the only option available, since button presses are passed to the new app. To support functionality for everyone, the power button support will be added as a user preference.
  • 10
    In all fairness, I don't think i've explained why the limitations are what they are and should probably have done that a while ago.

    The cover screen is effectively like plugging in a second screen on a previous S or Note series phone. DeX is effectively a secondary home launcher. Since this screen is part of the phone, instead of connected by a cable, a second launcher is used instead of DeX.

    The outer screen supports a second launcher, such as Nova or Smart Launcher 5. It also supports a primary launcher having a secondary launcher activity. Samsung, on the other hand, has disabled this support in favor of a hardcoded launcher that's built into the firmware.

    Samsung's launcher has been broken into the home screen, which is the clock selection, and widget pages. It's been further limited by only allowing certain widgets to be available on the widget pages.

    Being a system app signed by Samsung, they've gone a step further. The widgets allowed must system apps or signed by Samsung, as well. One loophole exists, which is Samsung Health. It does not need to be a system app, since you can install it from Google Play. It also doesn't need to be signed by Samsung for whatever reason. It does, however, still need to match up with the expected widget inside the expected app.

    This app takes advantage of the loopholes by using the specific component name (package / package.activity) of the Samsung Health widget and the package for Samsung Health. Because of this, the app must also be a widget, though. It cannot be a full launcher.

    Widget functionality is limited, but can support launching apps. This is another loophole that uses the widget list support to act as a fake launcher. Since the core launcher behind the widgets is still a launcher, it will launch apps on the cover screen.

    Like a normal Android screen, configuration changes are handled by the current activity being displayed. In this case, that would be whatever app is launched. The widget gets taken along for the ride. To minimize the impact of the launched app, the widget is designed to ignore any configuration changes, which would usually trigger the list to refresh.

    A few unique problems exist because of the cover screen being composed of widgets. One is that they do not follow the expected life cycle of a widget. They are not refreshed when they appear, which is why a swipe is sometimes needed to make list items clickable. Another is that they cannot perform any of the prep an activity provides, such as handling the lock screen. When an activity requests overriding the lock screen, it only extends to the activity and not to any it launched.

    This leaves us with what you see. A widget that exploits a bunch of loopholes within the limitations of the widget framework.
    9
    This is a WIP launcher for the cover screen that allows you to run apps without opening the phone.

    This is primarily useful for checking recent messages, running background tasks, or performing actions that do not require a keyboard or the full screen.

    Current limitations:
    • Apps require Screen lock type set to None / Swipe in Settings -> Lock screen
      • Bixby unlock can be used as a workaround for other lock types

    • Keyboards will not open on the cover screen and some app functionality is limited
      • Firmware limitation by Samsung - Secondary IME support is disabled

    • Switching apps requires tapping power and waiting for at least two seconds to close the app before launching the widget again (turn on cover, swipe to widget). The app list, however, can be swiped closed.

    • Samsung Health must be uninstalled to free up the package name for the whitelisted widgets. Installing this app will then add it as an option in the cover screen widgets.
      • Firmware limitation by Samsung - Widget package name or signature




    This app replaces Samsung Health and will not work with any other app that requires uninstalling Samsung Health.​


    Thanks @CarudiBu for discovering the workaround to load a custom widget.
    5
    Done. Now you can hide / unhide apps for the widget with a long press on the item (in the app settings).
    5
    Widgets on the cover screen are granted Settings.canDrawOverlays without the need for permission approval from the user?

    With the option off in the app settings, the app never requested the permission and instead simply verified that it was already granted. That is interesting...

    and now the big news:

    Portrait apps may now be fully functional, if my testing is correct.


    The permission approval button when launching the app from the drawer shouldn't be required, but it exists in case it will help with any finicky apps / devices. It will request system settings and overlay permissions.

    System settings permission will allow the widget to temporarily disable the automatic rotation option, while the overlay permission creates a fake view over the widget that is locked in portrait and steals focus from the widget to avoid it forcing the layout back to landscape. This will not, however, prevent apps with landscape support from functioning normally.

    A new caveat I found is that, when charging, tapping power and waiting won't exit the current app. I do not intend to address this right now. The reason being that the controls to have the power button return to the widget also force a screen timeout to return to the widget and can cause issues with the app being displayed when opening the phone.

    A quick and dirty workaround to change apps when charging is to simply open the phone a bit. This will reset the widget without breaking the expected functionality.

    As it stands, the power button and a timeout will not kill the current app unless they exceed two seconds and will not kill the app at all when charging. This allows long-term use of a single app, which fits most use cases. Other options to switch apps, such as volume button overrides, are also being explored.

    @ChrisChoi314 it appears your list of incompatible apps was lost in the cleanup. If you still find any, you can post the list on the issue for it.

    3
    Also done. Now the switches work as they were intended and long press is no longer used.