Do you have <uses-permission
android:name="android.permission.INTERNET"> in the application that
tries to bind to your service too? What does its manifest look like?
R/

On Wed, Apr 29, 2009 at 2:14 AM, Explore Android
<explore.andr...@googlemail.com> wrote:
>
> Hi,
>
> I am working on a implementing IM (yahoo) application in Android. I
> want to create a service which handles all the core part i.e.,
> creating a socket, logining into the IM server etc., and I want to use
> this service from a 'Separate' IM application.
>
> The manifest file of service apk is as follows,
>
> ==================================================================
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android";
>      package="com.sharp_eu.ste.imservice"
>      android:versionCode="1"
>      android:versionName="1.0.0">
>    <application android:icon="@drawable/icon"
>                         android:label="@string/app_name">
>
>    <service android:label="@string/app_name"
>         android:process=":remote"
>         android:name="IMServicesManager"
>         android:enabled="true"
>         android:exported="true"
>         android:permission="android.permission.INTERNET">
>
>       <intent-filter>
>             <action
> android:name="com.sharp_eu.ste.imservice.START_IM_SERVICE"></action>
>             <action
> android:name="com.sharp_eu.ste.imservice.BIND_YAHOO_SERVICE"></action>
>       </intent-filter>
>
>    </service>
>
>  </application>
>
>   <uses-permission android:name="android.permission.INTERNET">
>   </uses-permission>
>
> </manifest>
> ====================================================
>
> I have installed this APK into the emulator using 'Run->Run
> Configuration...' and selecting 'Do Nothing' option for Launch Option
> in Eclipse. I have checked that this apk is installed in the emulator
> by going to adb shell.
>
> Now I have created a new separate application which starts the above
> service and bind to that for using it's services. This application
> calls the login method in the service for logging into yahoo IM
> server. But I see 'java.net.UnknownHostException' and login is not
> successful. Why am I getting this error even though I have given
> permission to access internet both in services manifest and
> application manifest files.
>
> Note: if I make that service as part of my application there is no
> problem and the login process is successful. But I can not have that
> service as part of my application that is my requirement. I have to
> have that service separately existing somewhere in the phone and any
> application in the phone which wants to use it's service can just bind
> to it.
>
> Any clue why I am getting that error if make service put in different
> apk file.
>
> Thanks
> >
>

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

Reply via email to