yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Z Flip 3] twistedumbrella:
I have to fix an issue where launching the app on the cover screen requires you to kill it in the recent apps before it will launch again with the phone open.

Repository may look a bit ugly until I squash code written in the phone browser.
[Samsung Galaxy Z Flip 3] ione2380:
This sounds great. Too bad I really need s-health.
[Samsung Galaxy Z Flip 3] twistedumbrella:
Working on that.
[Samsung Galaxy Z Flip 3] M4-NOOB:
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
[Samsung Galaxy Z Flip 3] twistedumbrella:
Basically all my apps work, but I have to kill / click them in recents when opening the screen to launch them again. Still trying to resolve that.
[Samsung Galaxy Z Flip 3] HDCowboy:
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?
[Samsung Galaxy Z Flip 3] M4-NOOB:
Weird I can't get any I try to work (besides camera). The list just freezes (can't scroll up/down/left/right) when trying to start them
[Samsung Galaxy Z Flip 3] twistedumbrella:
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)

Yes, videos do appear to work in the YouTube app, sound and all.
[Samsung Galaxy Z Flip 3] twistedumbrella:
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.
[Samsung Galaxy Z Flip 3] twistedumbrella:
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.
[Samsung Galaxy Z Flip 3] twistedumbrella:
Builds are now mirrored to releases, so hopefully that removes the login requirement
[Samsung Galaxy Z Flip 3] M4-NOOB:
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.
[Samsung Galaxy Z Flip 3] CarudiBu:
From what I've seen testing launching some apps on the cover screen, apps need the

<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.
[Samsung Galaxy Z Flip 3] ChrisChoi314:
you can use bixby to autodicitate once ur cursor is in a textbox. it works anywhere. but unfortunatlely u cant do more than text to speech, so u wouldnt be able to type some complex numbers and symbols
[Samsung Galaxy Z Flip 3] ChrisChoi314:
no, from my testing, no paying app or money app works using hte launcher because literally none of them support rotate to landscape. so u have to open the phone to use it. btw u cant use any app that doesnt rotate to landscape, so make sure u dont have any of them on the launcher
[Samsung Galaxy Z Flip 3] ChrisChoi314:
right, u can already set up samsung pay to work when u scroll up from the main clock. but if u want the full functionality of the app, u will have to get multistart from goodlock and set all apps to autorotate as a labs feature, at least for samsung pay because it doesnt rotate natively.

thank you for detailing exactly whats happening in the backend. it seems like this really really really sucks, the fact that samsung has locked down the functionality of this cover screen. i hope they are planning to make it fill the entire half of the back, probably moving the camera down or smth, so that u can actually use it like a functional second display with all of the features.
[Samsung Galaxy Z Flip 3] ChrisChoi314:
holy cr*p, i tried this and it actually works. all of them open in landscape on the cover screen and they dont crash it at all or make the widgets disappear. thank you so much

@twistedumbrella, I think you will have to either find a way for samsprung to force all the apps on the phone into autorotate, or tell the users to download multistar from good lock, because i dont see any other way of solving this issue.
[Samsung Galaxy Z Flip 3] twistedumbrella:
... I don't even know how to respond to this.

EDIT: Resolved
[Samsung Galaxy Z Flip 3] kowalskitg:
Also it seems to have gotten lost to history (like 5 pages ago) but you don't even have to say "unlock" you just hold the power button to open bixby, let go then scan your fingerprint without hitting the button and bixby dissapears
[Samsung Galaxy Z Flip 3] ChrisChoi314:
oh sorry, my bad. this is the first time im using this website and i didnt realise it was doing that. i thought it would post one reply under each comment i did, not all of them at the end. i was thinking of combining them in a single comment so that it wouldnt take up so much space. ig i was treating it like reddit or something, not realising forums like this probably have different conventions. i will remove all of the duplicate comments. once again, i apologise

and of course i find out this site doesnt support deleting comments. ok ig ill just never make this mistake again. thanks for letting me know.
[Samsung Galaxy Z Flip 3] ChrisChoi314:
Do you know if there is a similarly simple way to go back from an app to samsprung launcher besides saying "exit the widget" or pressing the power button?
[Samsung Galaxy Z Flip 3] twistedumbrella:
Mistakes happen, but there is always that one guy doing it on purpose to worry about.
[Samsung Galaxy Z Flip 3] Badger50:
No worries, just call your friendly neighborhood Badger when you nee help! (y) ;)
[Samsung Galaxy Z Flip 3] twistedumbrella:
As the latest change implies, I am working toward the app being able to manage rotation settings temporarily. This would allow the widget to prevent apps from causing a rotation while loading and hopefully minimize the impact of that event.

When launching the app from the app drawer, the button at the top grants the app permission to manage settings. All actions are designed to be non-destructive, meaning they respect the original settings of the device and only change what is needed before changing it back upon exit.
[Samsung Galaxy Z Flip 3] twistedumbrella:
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.

Incompatible (Crashing) Apps · Issue #2 · SamSprung/SamSprung-Widget

This is a list of any known apps that crash back to the widget. This list will be updated as tests confirm the issues have been resolved.

github.com
[Samsung Galaxy Z Flip 3] twistedumbrella:
It's been 24 hours since claiming portrait apps should work and no reports they don't. I think that means we can call the widget functional with all apps.
[Samsung Galaxy Z Flip 3] crawls69:
My experience with portrait apps is they're now opening with the startup screen in landscape mode but when the app gets to the home page it reverts back to portrait mode.
[Samsung Galaxy Z Flip 3] twistedumbrella:
It's not supposed to force the apps to landscape. It is supposed to keep them from crashing.

The workaround was "lightened up" to prevent any unnecessary attempts for switching orientation. It's really only supposed to do the absolute minimum for working apps, but not try to force them to do anything.

The only real forcing may be to better handle the size of the screen. I'm not sure I can get my custom context override to extend beyond the widget, though.
[Samsung Galaxy Z Flip 3] crawls69:
Gotcha. My misunderstanding.

The portrait apps on my phone were never crashing on the cover screen. So it’s business as usual for me.

One thing I noticed…I understand (from your previous post) that the power button and a timeout will not kill the current app unless they exceed two seconds and it will not kill the app at all when charging. Even with my phone NOT charging I can't kill current app on the cover screen without resetting the widget (slightly opening my phone).
[Samsung Galaxy Z Flip 3] twistedumbrella:
Have you tried waiting longer than 2 seconds?
[Samsung Galaxy Z Flip 3] crawls69:
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.
[Samsung Galaxy Z Flip 3] twistedumbrella:
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.
[Samsung Galaxy Z Flip 3] crawls69:
Thanks. It works.
[Samsung Galaxy Z Flip 3] twistedumbrella:
Just a note for anyone testing portrait apps:

Crashing back to the widget is an issue with the orientation and adjusting the workaround may or may not be a possible fix in the widget.

Crashing back to the clock is an issue with the app itself (or a permission / settings prompt that needs to be accepted) and cannot be fixed in the widget, but may be fixed by configuring the app before attempting to launch it with the widget.
[Samsung Galaxy Z Flip 3] twistedumbrella:
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.
[Samsung Galaxy Z Flip 3] senergy:
After much playing with Bixby routines and autoinput I finally got this cool app working.

What are people using this for? i.e. what's the killer use case?

Please don't get me wrong, its awesome, I'm just finding it easier to open the phone.
[Samsung Galaxy Z Flip 3] twistedumbrella:
Playing games with auto battle, keeping track of DoorDash delivery updates, and (as mentioned before) checking messages that probably don't require a reply. It might seem easier to open the phone, but it reduces wear and tear on the hinge or leaving the phone folded open to collect all that dirt in the dip.
[Samsung Galaxy Z Flip 3] luigi90210:
I can confirm this bug where the widget doesn't launch apps on the cover screen and I can confirm I found a simpler fix, instead of restarting the phone, just remove the widget and readd it.

I did that and it fixed the widget
[Samsung Galaxy Z Flip 3] twistedumbrella:
Apps not launching should only require you to swipe up or down because the widgets don't refresh on the cover screen when opened (possible flaw in the launcher).

The issue was the initial load not displaying any apps.
[Samsung Galaxy Z Flip 3] luigi90210:
The issue I am running into is the app will not launch the apps on the cover screen at all but instead will have the app launched when swiped up on the lock screen however the behavior continues even when the lockscreen is disabled all together. The only way I have been fixing it is by restarting my phone however I found adding and removing the widget has worked to fix those issues.

I'm not 100% sure how to recreate the bug but it happened when I was trying to watch local movies using vlc player, if it happens again I'll get a logcat
[Samsung Galaxy Z Flip 3] twistedumbrella:
I've taken a minute to update the documentation and explain which limitations are being imposed on the widget and "why" they are limitations. It seems there is some traffic to the project coming from other sites that may not be aware these are not choices being made. From Github:

We also have at least one developer from Samsung tracking the project, so my hope is that clearly citing the limitations and why they are too restrictive has some impact on future firmware updates.

It sounds like your issue has to do with the requirements for the widget to work. If you have a lockscreen enabled, you need a way to dismiss it from the cover. This can be either using "none" or "swipe" and letting the widget handle it or using one of the password / pin / fingerprint options with Bixby unlock to bypass the interaction. The widget cannot override individual app restrictions for displaying on top of the lockscreen and even if it could, doing so would open a huge security risk for exploiting it.
[Samsung Galaxy Z Flip 3] ChrisChoi314:
Ok I just downloaded the new version and disabled the auto rotate on multistar from good lock to see if it would work as intended. i actually managed to get it not working after trying a couple of portrait apps. i tried tiktok and snapchat and paypal to see if it would remove the samsprung widget and limit it to 3, and it did. I apologise if that is really frustrating news, and that this was pretty late. i didnt have time to check this thread until now

BTW, is there a better way to update this app to be on the newest version? do i just download the apk from the github page ever so often?
[Samsung Galaxy Z Flip 3] twistedumbrella:
For now. Update notifications will come when there are less frequent updates.
[Samsung Galaxy Z Flip 3] twistedumbrella:
Added a quick and dirty update feature. Going forward, opening the app itself will pop onto Github to the latest release if it is newer than the one currently installed.

I still haven't decided whether or not the full automated self-updating feature will make it from my other apps. It's a lot of overhead for what is supposed to be a small widget.
[Samsung Galaxy Z Flip 3] Bryanpen77:
Hey just a quick suggestion. There is another front screen widget that opens websites called SubUI browser. It works without removing any locks and doesn't crash. But it's also kinda scary that you can use the browser on the outer screen all while the phone is locked. I wonder if the person who made SubUI browser is here. I am sure he could shed light on how he got the widget working without removing the locks
[Samsung Galaxy Z Flip 3] twistedumbrella:
I hope you meant that as a joke.

The browser works because it is self-contained. It's all explained in quite a bit of detail throughout this thread and the one for the browser.
[Samsung Galaxy Z Flip 3] twistedumbrella:
try {
val applicationInfo: ApplicationInfo = packageManager.getApplicationInfo (
launchPackage, PackageManager.GET_META_DATA
)
applicationInfo.metaData.putString(
"com.samsung.android.activity.showWhenLocked", "true"
)
} catch (e: PackageManager.NameNotFoundException) {
e.printStackTrace()
}

If it were only possible for one app to inject meta data into another without root, this would be the end of workarounds.
[Samsung Galaxy Z Flip 3] Bryanpen77:
Didn't mean any offense. Just thinking if someone knew this was on my phone they could just swipe over and browse into whatever site I am using. But I do love the extra functionality with the second screen.
[Samsung Galaxy Z Flip 3] twistedumbrella:
Not if you enabled a secure lock screen.
[Samsung Galaxy Z Flip 3] Bryanpen77:
The SubUI browser works with fingerprints and lock code enabled. Just if you open it then it needs fingerprint or code to unlock
[Samsung Galaxy Z Flip 3] twistedumbrella:
It's self-contained. This is launching other apps, but works with Bixby unlock.
[Samsung Galaxy Z Flip 3] luigi90210:
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...
[Samsung Galaxy Z Flip 3] twistedumbrella:
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?
[Samsung Galaxy Z Flip 3] twistedumbrella:
EDIT: Since no other information for the issue exists and it seems unlikely any further details will be provided, no additional investigation will be performed.
[Samsung Galaxy Z Flip 3] kowalskitg:
Thank you for keeping up with this, I enjoy seeing your posts in the morning and screwing around with the latest build. It's about the only interesting (to me) development that's actually happening with this phone.

Currently, I've gotten the smartride app to launch through Microsoft launcher, but the Bluetooth never actually connects, probably something to do with a power saving setting or something, will have to screw around with it more
[Samsung Galaxy Z Flip 3] twistedumbrella:
Thanks. I was looking through and couldn't find any obvious settings that might do that. You might want to make sure the app isn't getting moved to one of the sleep sections under the background usage limits. That keeps happening to a few apps I use regularly, which contradicts the explanation of the feature.
[Samsung Galaxy Z Flip 3] twistedumbrella:
Added some changes to the initial startup that shouldn't matter, but may solve issues in some rare cases. The configuration activity design for a standard widget doesn't seem to work with the cover screen, but the flow was added to allow making configuration optional and defaults load.

There are also a few updates to the widget layout and the class info in the manifest that may improve refreshing. Much like the configuration changes, they are fundamentally useless. There may be those rare cases when they make a difference, though.

Also realized the update notice in the settings activity was a bit silly, since nobody is meant to be opening that regularly. The next update will be focused on moving that to the widget with as little hassle as possible.
[Samsung Galaxy Z Flip 3] Clusco:
Great... improvement everyday...
[Samsung Galaxy Z Flip 3] mirkol78:
You are doing a great job! There is a way to support you?
[Samsung Galaxy Z Flip 3] twistedumbrella:
Thanks. I don't know what happened to the xda links, but this was mine back when they appeared in my profile.
[Samsung Galaxy Z Flip 3] crawls69:
Prior to this phone I had the motorola razr 5g. You could do just about anything on the outer display - it had it's own native app launcher, it could display a third party launcher along with the third party launcher's custom widgets, it had full keyboard functionality, etc.. Of course it's easier to do more on the razr 5g cover display because it's larger than the z flip 3 cover screen. However, Samsung should have integrated a little more functionality into the z flip 3 cover screen.

That said, you definitely added value to my z flip 3 with this launcher widget.

I made a small donation. Keep up the good work.
[Samsung Galaxy Z Flip 3] twistedumbrella:
Thanks. I really have no idea why they limited this one so much beyond "dumbing it down" for their store to control the clocks and widgets. The requirements to sell on the Galaxy Store are stricter than Sony and that is saying something.
[Samsung Galaxy Z Flip 3] jakobxxl:
Hi twistedumbrella, thanks a lot for this special app. Can i ask you please for the previous version? I have one app for reading the glucose level and scanning a sensor on the body... and i don't remember exactly that the reading was working before the update. In both versions i must open samsprung launcher and start the app and then i can scan the sensor, when i scanning the sensor a new page was open and the reading was done. Now it doesn't open the second page and i don't remember was it working before the update. Thanks in advance
[Samsung Galaxy Z Flip 3] twistedumbrella:
I don't keep older versions. Part of Github pushing out builds on its own was that each new one replaces the previous one. The app launching code hasn't changed across quite a few of them, so I would assume it would work the same in the previous one anyway. I will try a few apps that launch multiple pages and see if I can find a cause.
[Samsung Galaxy Z Flip 3] jakobxxl:
Thanks a lot, my app is LibreLink but without the sensor you can't go to the second page. The sensor get in touch with the nfc reader and open then the second page