[android-developers] Re: Sharing activities/Services across packages

2009-01-09 Thread rktb

Ahh...thanks much !!

On Jan 10, 12:53 am, Peli  wrote:
> Here is the 
> pointer:http://code.google.com/intl/de-DE/android/reference/android/content/I...,
> 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.
>
> Peliwww.openintents.org
>
> On 9 Jan., 20:35, rktb  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 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
-~--~~~~--~~--~--~---



[android-developers] Re: Sharing activities/Services across packages

2009-01-09 Thread Peli

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  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 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
-~--~~~~--~~--~--~---