how to use Remote Service?

by VoCaLiSt » Fri, 23 Apr 2010 12:38:34 GMT

Sponsored Links
i`m trying to use Remote Service btween two simple application, But
it`s not easy to me.
So any advice you have will help me.

here`s my case.

I made one app which is playing Music in service,
There are two components.
one is Activity controlling service by using three buttons,
play,pause, stop.
and it is working fine.

and another one is just simple Activity which also has four buttons
when i click bind, it`s confirmed by Toast msg, but when i click play
button,it occurs error.

i want to control first activity`s Music playing service in second
So i`m trying to use remote service.
i made same .aidl file in each app project.
In aidl file, i defined methods  "playing","stoping"
and i implement those methods in Music service class,
implementation is simply use intent and startService & stopService.

In DDMS there is "java.lang.SecurityException : Binder invocation to
an incorrect interface"
that`s the case  what i`m doing.

So please tell me what`s the problem.
any advice could help me.


Other Threads

1. Show a image when program is loading

i wrote and app which will download information from web. the download
time is quite long so the program stands still without any response
during download.

is it possible to display an image to indicate the app is loading when
the program is busy?


2. Asynchronous Tasks


I created two applications that need to run simultaneously.  Both
applications implement the LocationListener in order to detect if
someone is moving with the phone and both applications post to the
same php file.  I'm seeing that when I run the two applications, one
of the applications stops running without error.  My assumption is
that a conflict must occur between the two apps posting to the php
file.  However, from my understanding, if I use os.AsyncTask (I
haven't found a good example) or call httpclient.execute with a
response handler, this should eliminate some of the issues.

It appears that I'm still having the same problem.  IE, I go back to
one of the applications (which essentially just lists latitude and
longitude and I see that the application has stopped.

In both apps, I'm posting to the php client as follows:

                                String queryString = "http://
                                HttpClient httpclient = new
                                HttpPost httppost = new HttpPost(queryString);

                                log("executing request" + httppost.getURI());

                                // Create a response handler
                                ResponseHandler<String> responseHandler = new
                                String responseBody = 
                                // I've confirmed that the
responseBody is passing back what's expected
                       // shut down the connection manager to ensure
                       // immediate deallocation of all system resources


3. Dallas Android Developers

4. How does Android build background?

5. Issue creating shared preferences file in 2.0

6. sqlite in webview

7. Why Google named it "Android"!