KieronQuinn / Smartspacer

Smartspacer is a customisable widget for Android, but with a difference: It can upgrade the built in At a Glance on Pixels - without root!
GNU General Public License v3.0
1.94k stars 40 forks source link

Replace default at a glance widget by the smartspacer one #20

Closed Fefedu973 closed 10 months ago

Fefedu973 commented 10 months ago

Suggestion

Add the ability to replace the at a glance widget by this one in the pixel launcher

KieronQuinn commented 10 months ago

You already can. That's what Native Smartspace is.

Fefedu973 commented 10 months ago

Wait what you are the same guy that has done the pixel launcher mod. You are a genius lol. But does that mean that we could replace the at a glance widget with another widget or no because there is much more under the hood that I don't know.

KieronQuinn commented 10 months ago

No, this is completely different. I suggest you read the Medium articles linked in the readme.

Fefedu973 commented 10 months ago

No, this is completely different. I suggest you read the Medium articles linked in the readme.

Ok thanks! By the way, I started the development of this application https://www.reddit.com/r/androidapps/s/AnL7XHSL8K but I encountered some issues when it comes to developing it because it is not possible to display anything we want in widgets (so I cannot display widgets inside widgets without some sketchy workarounds) but in your app you seems to be much more advanced and skilled than me and I have seen that with expended smartspacer you can display widgets inside but is it possible to display these widgets inside the widget. (I think not but I still ask)

KieronQuinn commented 10 months ago

No, it's not. Again, please read the medium articles, they explain this.

KieronQuinn commented 10 months ago

Smartspacer's widget only uses RemoteViews. The only special thing it does is to use an accessibility service to know when the launcher is in the foreground, and as a result can halt CPU expensive updates when they're not going to be required.

Native Smartspace is not RemoteViews. Smartspacer is bound to certain templates defined by the system, which the Pixel Launcher shows. Launchers have full control over their own UI, so they can have horizontal paging - widgets cannot do this.

Widget stacks might be possible via a similar complex RemoteViews headless system to that used by Smartspacer for plugins, but they cannot scroll horizontally, and vertically you'd run into issues with widgets which also scroll in that direction. The most that might work is having buttons, like Smartspacer's has, but then you'd likely encounter layout issues as the widgets would be the wrong size.

My advice would be to leave this to third party launchers, it'd be a very complex app which may not even work.

Fefedu973 commented 10 months ago

So if I understand well it wouldn't be possible to display complex things as widgets in smartspaces (I was going to ask if it was possible to have a media control widget integrated like this but I think this is not possible.) Screenshot_20231027-203627.png

And as for displaying widgets in widgets like in my application I think that it is not possible because my application cannot have access to the content of these widgets and how they are made the only thing I can do is display a live feed of my app using constantly refreshed images

KieronQuinn commented 10 months ago

No, there's no template like that.

You're almost correct about your app, but it is possible to load RemoteViews from another widget and then pass them on, Smartspacer does this for plugins, but like I said all you'd really be able to do is display that single widget in another, since scrolling would be impossible and buttons would cause UI issues. I don't think it's worth the effort though.

Fefedu973 commented 10 months ago

No, there's no template like that.

You're almost correct about your app, but it is possible to load RemoteViews from another widget and then pass them on, Smartspacer does this for plugins, but like I said all you'd really be able to do is display that single widget in another, since scrolling would be impossible and buttons would cause UI issues. I don't think it's worth the effort though.

Ok thanks a lot for the tip you are very nice. 1mThis will help me a lot. And for the UI I'm gonna see. Thanks for everything!