03-02-2021, 01:02 PM
(02-06-2018, 09:22 PM)Grouxho escribió: Added a new feature to the app. Now you can define a broadcast with a common action (defined in a string, grx_common_extra_broadcast). Then you can add to each preference two new attributes (grx:commonBcExtra and grx:commonExtraValue)@Grouxho
The idea is that you can personalize a broadcast sent on preference changes. This allows a new way of updating mods (similar to group keys, but using an existing broadcast receiver) but it is still more flexible
You can play with the extra extring and the extra value to update individual groups of preferences. you only have to register in a broadcast the action defined in the string, and when you receive it, get the extra and process it to know what to update.
I will do an example soon.
Does an example for this feature exist? I searched but could not find one with grx.commonBCExtra feature described. Can you send a link to this example exists, please.
I want to use an existing intentreceiver, com.miui.app.ExtraStatusBarManager.REQUEST_RESTART, which is used on miui-roms (xiaomi) to update the statusbar if you change a theme.
Do i understand this correctly and i could only update a defined value and not restart the whole statusbar? This would save battery.
ps: this is the way the intent receiver is implemented, 2. example:
[/url][url=https://4pda.ru/forum/index.php?showtopic=760281&st=3360#entry75329976]MIUI - Модификация и украшательства - 4PDA