Making separate service app and separate activity app

by swapnil kamble » Thu, 03 Sep 2009 01:45:20 GMT


Sponsored Links
 


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.



--~--~---------~--~----~------------~-------~--~----~



Making separate service app and separate activity app

by swapnil kamble » Thu, 03 Sep 2009 01:46:57 GMT


 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

startService( i );

Is there any sample available for this ?

Thanks in advance.

-- 
...Swapnil

|| Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
|| Hare Rama    Hare Rama   Rama   Rama    Hare Hare ||

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Dragging markers in MapView

Hey
I ahve seen a couple discussions on this board about dragging icons in
Mapview. They did not get resolved; but I know this is possible since
it is implemented in both Locale and in the My Maps Editor.
So: how do I make it so that a marker can be clicked and draggable?

Thanks!

Alex

--~--~---------~--~----~------------~-------~--~----~

2. disable onscreen keyboard for dialer app

Hi,I want to disable the onscreen keyboard for just the Edittext field on
the dialer app, but not for the other edittext fields on other applications.
How can I do this? Are there any layout attributes that can be used?

--~--~---------~--~----~------------~-------~--~----~

3. Obtaining song metadata information for avrcp

4. what is the picture format for Picture.WriteToStream?

5. "My Location" of google maps cant work when I enable "Use wireless network" and disable "Enable GPS stellites".

6. build system issues

7. Android Test Framework - instrumentation