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. how to get the current shown text from a textview embeded in scrollview

hi everyone,i have been frustrated by this problem,i am now try
to get the current shown text in the textview as a bookmark for future
reference.but how can i located to this site,and save a portion of  my
string?,any one know how,please let me know.thank u in advance.


2. Problem with using back button when on home activity

I am sure this is easy, but can't find solution for this.

My app structure is something like this:

HomeActivity > subActivity > subSubActivity > subSubSubActivity
On each activity (except home) in top left corner I have Home Icon
which creates new Intent and starts home activity with StartActivity.

What's happening:
1) I am on home
2) Lunch subActivity
3) Lunch subSubAcitivity
4) Press Home button
5) On home
6) Press Back Key
7) I am on subSubActivity   (I would like to exit app here)

Is it possible to delete "history" when on home activity?

I tried to fix it with executing finish() before starting Home
Activity (in step 4), but in that case Back button will take me to
subActivity (which was running before). So, basically I want Back
button to work on all activities as intended except on Home activity?



3. rfcomm error with BT headset

4. AudioEffect integration

5. Detecting Search button

6. WMT : pull My files.apk dari Gtab

7. What's the official way to take a picture using the camera?