On Wed, Sep 2, 2009 at 11:06 AM, swapnil kamble <swap.kam...@gmail.com>wrote:
> Hi All, > I am new to android. I want to create a service, which will > installed independently. And there will be multiple activity apps > communicating with it, justlike doing IPC. I saw the DualSeviceClient sample > which itself writes a service and communicates with it. But I want to run > service only app separately and activity app separately. > > I also tried a separate service wiht my own. I installed it also. Now to > start or stop from activity app I need to call startService (Intent) or > StopService (Intent). > > And my problem is how do I know class name package name reqd for intent > before starting or stopping in following code, > > Intent i = new Intent(); > > *i.setClassName( "com.DualServiceOnly", > "com.DualServiceOnly.DualServiceOnly" );* // How to > associate service here > Now I am using this code to call service as Intent i = new Intent(ICounterService.class.getName()); ComponentName cn = startService( i ); but I am getting cn as null, ie, service not available. How do I get list of running services ? I have installed service with android. > > startService( i ); > > Is there any sample available for this ? > > Thanks in advance. > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---