Last-Launcher
Last-Launcher copied to clipboard
Color generation companion app
In the discussion of #2, there is a consensus (?) of having a companion app (ColorSniffer) to determine the app colors. I'm opening this issue thread for general discussion of the interaction between Last Launcher and the companion app and tracking related issues.
Possibly related (i.e. may be solved by the companion app) issues:
- [ ] #2
- [ ] #6
- [x]
#10
Discussions and questions in the following posts.
The first question is: how does Last Launcher (want to) interact with the companion app?
- [x] Currently ColorSniffer can export the color schema to clipboard. If this approach is used, Last Launcher also needs to support import from clipboard.
- [x] A potentially more intuitive way is to pass information through
startActivityForResult(). The companion app returns the data through theIntent.There are two possible approaches:wrap the data as string, and parse it in Last Launcher- use the app launcher names as keys, and put the color as values
- [ ] A more extended extra possibility is to allow to call the "set color scheme" listener in Last Launcher from the companion app, so the interaction starts from the companion app (other than Last Launcher setting page)
Support in Last Launcher:
- [ ] Clipboard import
- [ ] Use
startActivityForResult() - [ ] Call Last Launcher to change color scheme
Currently ColorSniffer can export the color schema to clipboard. If this approach is used, Last Launcher also needs to support import from clipboard.
Although it is straightforward but It is not a long time approach, Android 11... or newer version might removed this. Keep this feature alive in your app i will also work on this. Could you provide and unique string before the DATA to validate its sources.
A more extended extra possibility is to allow to call the "set color scheme" listener in Last Launcher from the companion app, so the interaction starts from the companion app (other than Last Launcher setting page)
Both way interaction is better than one way.
A potentially more intuitive way is to pass information through
startActivityForResult()The companion app returns the data through theIntent. ii. use the app launcher names as keys, and put the color as values
👍 could you also provide A DEFAULT COLOR for rest of the Apps.
I have make the some changes to app in which app sending some data
- Default Color integer (key:
default_color_for_apps) current theme font color - if possible, will send Theme related data
and app is receiving the following data
- A Bundle with key
color_bundle
which contain the all data i. if user set the default color inColor Snifferthen Bundle have the default color for all others app (same key as above) else it have valuenull or -1ii. color values as proposed by you
Clipboard id for validate it source bae73ae068dacc6cb659d1fb231e7b11 i.e LastLauncher-ColorSniffer MD5-128
https://github.com/SubhamTyagi/Last-Launcher/blob/41bce292f7ef8e344e54bf9a4733e3178f57fe78/app/src/main/java/io/github/subhamtyagi/lastlauncher/LauncherActivity.java#L517
https://github.com/SubhamTyagi/Last-Launcher/blob/41bce292f7ef8e344e54bf9a4733e3178f57fe78/app/src/main/java/io/github/subhamtyagi/lastlauncher/LauncherActivity.java#L531
I didn't find any information about why Android would remove clipboard. The only source I found was Android 10 changes, but it does no harm to this usage: both apps will be in front ground when accessing clipboard.
Anyway, your specification matches my expectation too. I'm making changes according to it.
I didn't find any information about why Android would remove clipboard. The only source I found was Android 10 changes
it is a possibility and We didn't trust Google behaviour
How about passing the "default color" like this?:
- Last Launcher passes it with key
default_color_for_apps - ColorSniffer passes the
Intent(Bundle) containing the (possibily) updateddefault_color_for_apps, and this sameIntent(Bundle) contains the otherBundlediscussed above (i.e. nested)- It doesn't directly set all "other" apps with this default color value in the nested
Bundle, i.e. won't contain those keys
- It doesn't directly set all "other" apps with this default color value in the nested
- Last Launcher changes colors of apps on its side, using the default color where necessary (esp. when key not in the nested
Bundle)
This makes a further extension more intuitive:
- Last Launcher can maintain a list of apps whose color will be kept as "default". This list can be passed to ColorSniffer and the user can respect or change. Finally, this list will be passed back to Last Launcher. (I suggest to use key
use_default_colorand pass a String array throughputStringArray()/getStringArray().) - If this way is adopted, then, for all the apps not in the nested
Bundle(i.e. be given a new color) and not in the String array (i.e. use default color), their colors should be kept unchanged?- Another view is to also explicitly pass a String array containing the apps whose colors should be kept unchanged. This can differentiate those being explicitly made "unchanged" from those "unrecognized".
Last Launcher can maintain a list of apps whose color will be kept as "default". This list can be passed to ColorSniffer and the user can respect or change. Finally, this list will be passed back to Last Launcher. (I suggest to use key use_default_color and pass a String array through putStringArray()/getStringArray().)
i will pass the app list which will keep as "unchanged" color, and you can exclude these apps when passing the bundle to last launcher.
@renyuneyun ?
I must say that I don't quite understand why this would be done as an external app instead of just having the built-in random colour generation instead use the app name as an "input hash" so it always generates the same colour for each app name, I do want to state my support in having the colours remain the same always for each app, makes looking for the right app much much faster.