how to use Remote Service?

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


Sponsored Links
 Hi
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
bind,play,stop,unbind.
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
Activity.
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.
thanks
Gun.

--



Other Threads

1. Adding ASFParser(for wma for which libraries are available i need to call API's)

My job is to add wma decoder and supproting parser whose libraries are
provided by some company...

1. I went through  opencore/engines/player/config/core/
pv_player_node_registry_populator.cpp where all nodes are registered
2.in pvplayerengine.cpp we have
AddDataSource..Init()...Prepare..Start()...Stop()...

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. How to get access for surfaceflinger

Hello All,
            I am developing video renderer application. In that i am
using surface flinger APIs. I am building and testing my application
on eclipse with adt packages.
           I have one wrapper code which is accesing surface flinger
APIs and its classes. Now when my .apk is being installed on
emulator , i am getting following errors.

servicemanager : Permission failure :
android.permission.ACCESS_SURFACE_FLINGER from uid = 10032 and uid =
660
surfaceflinger :  permission Denial : can't access Surface flinger
pid=660 , uid =10032

             I have changed my AndroidManifest.xml also and added
 <permission android:name="android.permission.ACCESS_SURFACE_FLINGER"
              android:protectionLevel="signature" />

But still i am getting the same error.

I have read that when we build application on eclipse it already self
signed application.apk file.

I have applied steps mentioned at following link to sign it again.

http://developer.android.com/guide/publishing/app-signing.html

But still i am getting same error.

Now what Dianne Hackborn is telling that


"
You need to work with your device manufacturer.

If you don't have one, you will want to download the Android source
code to
build your own emulator and system image, so you can sign your app
with the
same cert used to sign your system build.

Please direct further questions to android-porting, as this is outside
the
scope of SDK development.    "

I am little bit confused how can i build emulator and generate system
image.

I am following steps mentioned at following link to download android
source code and building it for beagle board.

http://code.google.com/p/android-development-environment/wiki/FroyoOnBeagleBoard

It gives me rootfs as well as kernel image. But when i simulate my
application on eclipse emulator it fails at permission failure of
surface flinger.

          Can anyone guide me , if i am doing something wrong.

          Also tell me the procedure to get surface flinger access
from my native code. For this whatever procedure will be there , i am
ready to do it.

           Waiting for your kind reply.

Thanks In Advance,
Tejas.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. http post and get request for updating map

4. IOException with openRawResource(int id)

5. Wallpaper problems on Droid X

6. Looper.prepare() question

7. Retrieving the path of a picture returned by ACTION_IMAGE_CAPTURE