On Feb 12, 2:47 pm, Dianne Hackborn <[email protected]> wrote:
> Um.  This is the package your service is in:
>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android";
>      package="*com.android.TestService*"
>
> And yet you are trying to start a service in the other package:
>
> Unable to start service
> Intent { 
> comp={*com.android.servicemonitor*/com.android.TestService.TestService}

That's what the error is, I'm simply calling start service like this:

if( null == startService( new Intent( this, TestService.class ) ) )
{
        if( null != in_oOutput )
        {
                in_oOutput.append( "\nstartService returned 'null'" );
        }

        return false;
}


My client class has imported TestService via:

import com.android.TestService.*;

So, I'm wondering why, unless I declare the service in the client's
manifest as I explained before (and change absolutely nothing else)
does it work just fine, but without the service line in the client
manifest it is trying, for some reason, to find it in the wrong place.

When it works, the activity manager reports in the log:

"02-12 15:08:43.541: INFO/ActivityManager(50): Start proc
com.android.servicemonitor:remote for service
com.android.servicemonitor/com.android.TestService.TestService:
pid=621 uid=10018 gids={}"

So it would seem that com.android.servicemonitor/
com.android.TestService.TestService is perfectly fine.

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

Reply via email to