Here is the pointer:
http://code.google.com/intl/de-DE/android/reference/android/content/Intent.html#setClassName(java.lang.String,
java.lang.String)
Try this:
Intent serv = new Intent();
serv.setClassName("com.android.rk1",
"com.android.rk1.RKTestService1");
It is considered more general though to introduce new intent actions
and implement an intent filter in your manifest file.
Peli
www.openintents.org
On 9 Jan., 20:35, rktb <[email protected]> wrote:
> Hi,
>
> I have two packages and would like to share activities and Services
> between them. The following is what I have:
>
> package1 -- com.android.rk1
> This package consists of a service by the name "RKService1".
>
> package2 -- com.android.rk2
> This package consists of a service by the name "RKService2".
>
> Now, from an activity of package2, I can call the service RKService2.
> Intent serv = new Intent(this,RKTestService2.class);
>
> But, I am not able to call RKService1 even after importing package1.
>
> To begin with, I am seeing the compilation error:
> "package com.android.rk1 does not exist"
> where my import line says ..
> "import com.android.rk1.RKService1;"
>
> Any pointers will be appreciated.
>
> Thanks,
> Ravi
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---