Closed GoogleCodeExporter closed 9 years ago
Original comment by romannu...@google.com
on 26 Feb 2013 at 2:21
Original comment by roman.nurik
on 1 Mar 2013 at 5:57
Yes, this is quite important. A push model should be a lot more efficient than
the current pull model where the DashClock extensions can request to be updated
when the device wakes up.
Original comment by android....@gmail.com
on 8 Mar 2013 at 3:56
The only way currently to work on a push mode is using a ContentResolver, but I
think this is not enough. An extension should be capable to send manual updates
to itself.
Original comment by igce...@gmail.com
on 9 Mar 2013 at 6:57
It is already possible.
I'm sending:
context.sendBroadcast(new Intent(ARS_CHANGED_INTENT));
when my status should update, I attached implementation from my app.
It works, but maybe there is a reason that I should not doing it this way that
I'm not aware of.
Original comment by ph4n...@gmail.com
on 11 Mar 2013 at 3:13
Attachments:
[deleted comment]
I think the concern is that if the extension isn't currently initialized (e.g.
if the DashClock or extension process has died), there's no easy way to trigger
an update for it.
I'll look into simplifying this somehow.
Original comment by roman.nurik
on 20 Mar 2013 at 1:00
Then again, if you're not yet initialized, you don't need to update the widget,
because upon initialization it'll update :-)
Original comment by roman.nurik
on 20 Mar 2013 at 1:01
Exactly, I tested my solution and it always works, you could use it as an
example how to update extension.
Original comment by ph4n...@gmail.com
on 20 Mar 2013 at 1:05
Yeah going to mark this as WontFix because of the variety of clean workarounds
and that there's no clean solution that doesn't have security implications.
See also: http://stackoverflow.com/questions/15567702
Original comment by roman.nurik
on 23 Mar 2013 at 3:02
Issue 452 has been merged into this issue.
Original comment by roman.nurik
on 27 May 2013 at 6:28
I've got this working great using #5's sample code, prefixing every occurrence
of registerReceiver, unregisterReceiver and sendBroadcast with
LocalBroadcastManager.getInstance(context) so it's not a global broadcast.
Works fine. I also added an easy-to-use static method updateDashClock that you
can call to update your DashClock extension. You can call this whether or not
DashClock is installed on the user's device. See attached.
Original comment by ken...@kentonprice.com
on 2 Jun 2013 at 4:44
Attachments:
Original issue reported on code.google.com by
kirill.r...@gmail.com
on 26 Feb 2013 at 12:08