Swathi EP
Swathi EP

Reputation: 3934

android:How to create an service running in background and enable it to access other applications

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

Answers (2)

Chris Thompson
Chris Thompson

Reputation: 35598

Check out the Service framework: android service

You may also be interested in the ContentProvider framework.

Upvotes: 4

Emmanuel
Emmanuel

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

Related Questions