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

Themes / Apps / Mods SamSprung Cover Screen Launcher

Search This thread

Clusco

Member
Dec 19, 2020
20
5
Samsung Galaxy Z Flip3
Thanks...
 

Attachments

  • 20210916_155747.jpg
    20210916_155747.jpg
    1.7 MB · Views: 73

dallasnights

Senior Member
Sep 25, 2006
145
20
Might be a bug or something when I hold down an app yep it hides it which is great however if I want to unhide it that doesn't seem to work it doesn't click on I'm wondering if you can fix that or tell me how to fix it thanks and keep up the great work
 
Might be a bug or something when I hold down an app yep it hides it which is great however if I want to unhide it that doesn't seem to work it doesn't click on I'm wondering if you can fix that or tell me how to fix it thanks and keep up the great work

Same way it was hidden. Long press on it.

The switches will eventually replace that. Long pressing was just the fastest way to get the feature included.
 
Last edited:

Ptrprkr

Member
Sep 15, 2021
22
2
... anyway...

Working on adding the ability to hide apps. It will be ugly and it will be done in the settings page (home activity), but it should at least work.
This will be a great addition. Thanks so much. Will look forward to g
Same way it was hidden. Long press on it.

The switches will eventually replace that. Long pressing was just the fastest way to get the feature included.
Thanks Twistedumbrella. This is getting better and better.
 

Ptrprkr

Member
Sep 15, 2021
22
2
So, my experience so far. It appears that apps that, natively, will only display in portrait view, when launched on this outer screen launcher, cause this launcher to disappear as a widget once I close out of the launched app. I then need to restart my phone to get the launcher back. Using the Cover Screen Widget settings does not re-establish the launcher. Pressing the + to add a widget after this happens, does not show this launcher as an option. This does not happen with apps that will rotate. Trying to figure out options.
 
So, my experience so far. It appears that apps that, natively, will only display in portrait view, when launched on this outer screen launcher, cause this launcher to disappear as a widget once I close out of the launched app. I then need to restart my phone to get the launcher back. Using the Cover Screen Widget settings does not re-establish the launcher. Pressing the + to add a widget after this happens, does not show this launcher as an option. This does not happen with apps that will rotate. Trying to figure out options.

When you have the widget selected already and hit the +, you have to tap the arrow in the top left and then remove it before it can be selected again.
 

Ptrprkr

Member
Sep 15, 2021
22
2
When you have the widget selected already and hit the +, you have to tap the arrow in the top left and then remove it before it can be selected again.
Got it. Any reason why (am I the only one experiencing this) apps that launch in portrait mode, end up causing the launcher to disappear as a widget to begin with? This does not happen with any apps that rotate.
 
So the problem with apps launching from a widget is the lack of control over orientation. When an app triggers a rotation, it calls update on the widget. This causes the widget to reload and the app to exit.

There are a few ways to fix this, but the only one without any downside would be Samsung opening up the cover screen launcher to being replaced. The second way is one I originally began to write and will finish to see if it's a reasonable solution. It may have minimal impact on battery and performance, as well.

The alternative would be something like the mirroring, which could act as a pseudo-launcher, but at the cost of HUGE battery drain, since you will now be running the full phone all the time. This also requires you never allow the phone to time out, which would allow AOD or the widget to take over. One slight way around that would be a hybrid widget / mirror app that acted as its own launcher widget. This would, once again, fall under the limitations of the widget, though.
 
The second way turned out to not only work, but have little impact

Chase
Exxon/Mobile
Dropbox
Crunch fitness

Lots of others, but they all do the same thing. Thanks

I wasn't able to duplicate this with Dropbox, but I did find an app that could. Looking into it now.
 
Last edited:

Ptrprkr

Member
Sep 15, 2021
22
2
The second way turned out to not only work, but have little impact



I wasn't able to duplicate this with Dropbox, but I did find an app that could. Looking into it now.
Yes, so far, I have 1 app that launches in portrait mode, and does not yet crash the launcher (Out of Milk). Other apps that only launch in portrait mode still crash the launcher (TV Time, CNBC, Range Rover Remote).
 

kowalskitg

Member
Jul 12, 2007
13
2
So the problem with apps launching from a widget is the lack of control over orientation. When an app triggers a rotation, it calls update on the widget. This causes the widget to reload and the app to exit.

There are a few ways to fix this, but the only one without any downside would be Samsung opening up the cover screen launcher to being replaced. The second way is one I originally began to write and will finish to see if it's a reasonable solution. It may have minimal impact on battery and performance, as well.

The alternative would be something like the mirroring, which could act as a pseudo-launcher, but at the cost of HUGE battery drain, since you will now be running the full phone all the time. This also requires you never allow the phone to time out, which would allow AOD or the widget to take over. One slight way around that would be a hybrid widget / mirror app that acted as its own launcher widget. This would, once again, fall under the limitations of the widget, though.
I don't know what they heck I did but I had pokemon go working in portrait for a while, it would crash 2-3 times initially but eventually catch and stay open. I haven't been able to get it to stay though since I re-enabled lock screen and did the bixby unlock thing, but that may be a coincidence as I changed a bunch of stuff that night
 

Ptrprkr

Member
Sep 15, 2021
22
2
I don't know what they heck I did but I had pokemon go working in portrait for a while, it would crash 2-3 times initially but eventually catch and stay open. I haven't been able to get it to stay though since I re-enabled lock screen and did the bixby unlock thing, but that may be a coincidence as I changed a bunch of stuff that night
So the one app that did not seem to crash the launcher (Out of Milk) is crashing the launcher. Thus, all portrait only apps crash while those with auto rotation do not.
 

igawa

New member
Sep 18, 2021
2
2
Thanks for creating such a beautiful widget, and as I installed it from the first launch, it getting more and more stable.

Btw I managed to bypass the lockscreen. If you have configure smart lock (watch, band, or location, etc) and install tasker auto input to bypass lockscreen swipe to unlock. It runs perfectly without disabling the screen lock.

It even support nfc tagging when phone closed just by double tapping (if you use tasker and want to automate something).

I really hope someone working on the cover screen combined with tasker haha

Kudos to dev.
 
  • Like
Reactions: kashortiexda

Top Liked Posts

  • There are no posts matching your filters.
  • 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.
    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
    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.
    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.
  • 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.