[android-developers] Running wallpaper to react to changes in SharedPreferences

2012-02-17 Thread Doo
Hi.

(i know it's been asked in different forms already)
I've written the live wallpaper (there can't be enough ;) and it has
display settings. The problem is that when after the WP is being
chosen if I go to WP selection, choose the same one, tinker with
settings, the preview window reflect changes, the current running one
does not. I assume that it's because those are two separate processes
and SharedPreferences notify inside same process only (so far).

So the question is is the broadcast intent the only option?
sendWallpaperCommand doesn't work if you're not the view host, no-
create binding(my first idea) to service is impossible because onBind
is final. I mean I can do that but it's somewhat strange that there
are settings for WP and no standard and easy way to notify running
instance about that.

Cheers.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Running wallpaper to react to changes in SharedPreferences

2012-02-17 Thread Harri Smått
On Feb 17, 2012, at 12:55 PM, Doo wrote:
> I mean I can do that but it's somewhat strange that there
> are settings for WP and no standard and easy way to notify running
> instance about that.

What gives you an idea there isn't a standard and easy way for getting both 
preview and actual WP instances notified about preference changes? I've never 
had similar problems you're describing here and find it possible there's a flaw 
in your SharedPreference handling instead. Which, for some odd reason, was not 
included as a possible cause in your email at all   ;)

So please, do send some code relevant to SharedPreference handling which 
hopefully leads to more specific answer to your question.

--
H

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en