views:

68

answers:

1

I have an application that is at the same time a broadcast sender and receiver of standard action android.intent.action.SET_WALLPAPER. I want to do some stuff only in a case when another application broadcasted this intent.

Is there any way to determine who initiated a broadcast in onReceive method of a BroadcastReceiver?

A: 

No.

If you only want to do something when an action was broadcast by another app (i.e. not yours), I imagine it should be easy to determine that your app didn't send this broadcast, and therefore it was someone else..

Christopher
of course, but in that way I have to use kind of timestamp/flag somewhere in my app - I don't explicitly send a broadcast, it is done by Android when I call setWallpaper.
Worldscope
That's correct.
Christopher