Reputation: 3934
I wanna create an notification application/service, which should be accessable from other applications similar to android's Notification and NotificationManger.
As i m a newbie to android development, i wanna know how to develop an service running in background n how to access it from other applications?
Upvotes: 0
Views: 6089
Reputation: 35598
Check out the Service framework: android service
You may also be interested in the ContentProvider framework.
Upvotes: 4
Reputation: 17051
Android inter-process communication is very different from other platforms. Each process is separate from other processes. You can only send messages between processes.
If you want to invoke a method of a service from an activity, you can bind to it asynchronously (often in onCreate()) and after you're bound then you can call its methods directly. But this is only available in activities.
To call a service from another service or a Broadcast Listener, use startService() to send it messages, which can contain actions and extras (equivalent of methods and parameters).
Activities can register broadcast listeners, which also process actions and extras.
I hope this helps.
Upvotes: 0