Android Question How to force a livewallpaper refresh

NeoTechni

Well-Known Member
Licensed User
Longtime User
I'm making a launcher and using my livewallpaper from another app as the background. I keep them as separate apps to reduce bloat (the other app is a game)

Now since there is apparently no way to control the scrolling in B4A, I use broadcasts to get around that. The problem is, once the user lifts their finger and it's supposed to scroll back to 0 (or whathaveyou) I can't get the livewallpapermanager to fire properly. I'm currently using:

B4X:
Sub Refresh
    lwm.StopTicking
    lwm.StartTicking(1)
    NeedsReset=True'after an update, this tells me to set the delay back to the original time, but this event is called repeatedly from the other app so it shouldn't be the cause
End Sub

But there's still an almost second delay between updates.
I don't want to leave the timer increment at 1 cause that'd be a waste of power
Is there another way to force an update?
 

NeoTechni

Well-Known Member
Licensed User
Longtime User
In the launcher I use:
SetActivityAttribute(main, android:theme, @android:style/Theme.Wallpaper)

Then I just broadcast the X and Width to the LiveWallpaper app which bypasses the settings from the LWmanager

It works perfectly, while the finger is down.
 
Upvote 0

NeoTechni

Well-Known Member
Licensed User
Longtime User
I broadcast while the finger is moving, and the livewallpaper app receives it just fine, the problem is how do you trigger a livewallpaper manager update from wthin the app

Can you add a force update event to the manager ?
 
Upvote 0

NeoTechni

Well-Known Member
Licensed User
Longtime User
Exactly. I'm requesting one.

Otherwise it only updates when the homescreen tells it to. And I don't know how to do that.
 
Upvote 0
Top