im trying to understand what is the difference between a service and a broadcast receiver, as i see they can do the same.
For example, I have an application: App1 which provide a service called ToastHelloWorld, which simply creates Toast and stopSelf (). I host it in other applications using an intent filter with the name of the action: "com.test.HelloToast"
Now I have another application: App2 I want me to imply using the service with the action "com.test.HelloToast", so I call startService (new Intent ("com.test.HelloToast"));
and it works.
Why should I use broadcast receivers when I can do everything with services and have no limit on the execution limit of 5 seconds?
I know that most “system events” are published through broadcasts, but can't they be published as official intentions?
android
Mads Lee Jensen Jul 17 '10 at 18:36 2010-07-17 18:36
source share