Perform the following steps
The class needs to notify Update Contact Map both prior to connection to the server and immediately thereafter, so that these class can read and write XML documents relevant time. That is, ContactMap needs to offer two remote methods that Update can access: The question that may arise now is that if Update needs to have an instance of the mobile recharge api remote interface ContactMap and register to access it, why the reverse does not the same process is performed? Why ContactMap not need to have an instance of the remote interface Update and therefore also register.

The answer is yes ContactMap need, as is logical, an instance of the www.billpaymart.com remote interface Update seeking access to, but need not register because the automatically obtained thanks to method. This is detailed below. As mentioned, it is simpler to communicate a Service Activity with her than vice verse. Once known fast mobile recharge interfaces that are required, the first step is to formally declare through AIDL. The following code shows the declaration of the remote interface ContactMap called. In it, the method returns a string value consisting of the XML request is sent to the server.
It is very important
Meanwhile, the method receives as a parameter other string representing the XML response received from the server. These statements should be stored in files with the same name as the fast mobile recharge interface and then. Extension. When working with the plug-in of Eclipse, simply place them in the same project where they will be used will be generated automatically two Java files, one for each interface, representing the receipt or stub that other end should know to use them. In this case, as ContactMap and Update both ends are in the same project, no need to move any of the guards.

Having declared the AIDL interfaces with language, the next step is to implement the methods declared in them. The interface corresponds to the calls that make the Update ContactMap class to press here tell both mobile recharge api of you will connect to the server and requires a petition, as the connection has ended and already has an answer. To implement the interface class ContactMap a new attribute of this type is declared and announced both methods are constructed. The Code is exposed on the implementation.
Types of mobile recharge api
As seen in Code, the method uses the class to build an XML document representing a valid request, where the report server the user's position and the positions of the contact request. By contrast, the method also uses the class but to read the XML response received from the server, where the location information of fast mobile recharge the contacts will be found. Next, the implementation of the interface shown in Class Update. Before implementing the interface, an instance of the class RemoteCallbackList belonging to android.

OS package is declared. This class makes it easier to manage a set of remote interfaces especially designed for callback from a service. In the case discussed here, a there will be only one element in this list: the instance of the interface. Remote methods register and simply add or delete a remote interface to the list. Thus, once it is included in that list can be accessed without any problems to remote methods offered by get in touch that interface. At this point, the remote interfaces and have been declared by AIDL are automatically generated the stub or receipt and also have implemented the mobile recharge api methods that each interface provides: the interface is implemented within the ContactMap class and the interface Update is in the class.