Hi All,

I am trying to access a service in other package, but not able to get the
binder.

Attached my file hierarchy.
This is the manifest file for the ExampleService package
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
    package="example.service" android:versionCode="1"
android:versionName="1.0">
    <application android:icon="@drawable/icon"
android:label="@string/app_name">
        <service android:enabled="true" android:label="ExampleService"
            android:name=".ExampleService">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </service>
        <receiver android:name=".ExampleServiceReceiver">
            <intent-filter>
                <action
android:name="android.intent.action.BOOT_COMPLETED"></action>
                <action
android:name="android.intent.action.USER_PRESENT"></action>

</intent-filter>
        </receiver>
    </application>
    <uses-sdk android:minSdkVersion="8" />
</manifest>

In the ExampleActivity i am accessing the service by doing

import example.service.IExampleService;
.....

        ServiceIntent = new Intent();
        //ServiceIntent.setComponent(new ComponentName("example.service",
"example.service.IExampleService"));
        ServiceIntent.setClassName("example.service",
"example.service.IExampleService");
        bindService(ServiceIntent, conn, BIND_AUTO_CREATE);
.....

but onServiceConnected( ) is not getting called, so i am not able to get the
binder. But process everything is going fine , in the Eclipse console i am
able

I tried with serComponent( ) & serClassName( ) as well, but for both the
cases onServiceConnected( ) is not getting called. I googled and used the
hint for listening
boot completed and user present intents and starting the service in the
broadcast receiver.

Please help me how can i access the service of other package (process).

Thanks & Regards,
Suman

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<<attachment: untitled.JPG>>

Reply via email to