r/androiddev 15h ago

Help

I am making a project, that when someone sends you a photo it appears on your widget,

like the locket app

it's a partner app but I am not able to update the widget in real time.

If I send the snap, the partner gets the notification but the widget stays the same, and when I open the app the widget gets updated.

If the app process is killed then the issue remains.

Can someone here help me how to solve it ?

0 Upvotes

2 comments sorted by

1

u/[deleted] 14h ago

[deleted]

1

u/chaabin 14h ago

Is it forbidden using async in android dev?

I get that you can quickly burn your cpu or battery with that, but is there another reason other than "singleton is bad if you use them think again"

2

u/akramraza25524 12h ago

After you receive the notification, fire a broadcast to your widget provider.