Application without an Activity just a Service

Put your problem here if it does not fit any of the other categories.

Application without an Activity just a Service

Postby moritzz » Sat Nov 07, 2009 9:23 pm

Hey guys,
I'd like to create an application that just consists out of a service. It's supposed to log some activity for a later use. How can I do that?
moritzz
Junior Developer
Junior Developer
 
Posts: 11
Joined: Sat Nov 07, 2009 9:20 pm

Top

Postby ExxKA » Sun Nov 08, 2009 5:20 pm

That's not a problem.

But you need to start it somehow, right? If it's just for testing purposes, you could start your service class with a unit test, I do this all the time.

But if this is the way your application should function, then you need to start it either by listening to a boot up intent or to listen for an intent for starting the application, which has the application launcher as a the category (this will place an icon for the application in the menu).

Any basic tutorial on creating an application should give you more details on these intents.
ExxKA
Developer
Developer
 
Posts: 29
Joined: Tue Nov 03, 2009 7:16 pm
Location: Denmark

Postby moritzz » Sun Nov 08, 2009 5:30 pm

I don't really understand how you mean that. Do you have a tutorial or some code or sthg? I'd like to start the service when the phone boots up.

edit: Okay I guess I found some stuff on that one.
moritzz
Junior Developer
Junior Developer
 
Posts: 11
Joined: Sat Nov 07, 2009 9:20 pm

Postby ExxKA » Sun Nov 08, 2009 6:29 pm

good :) Well it seems to me that you could really gain from reading a starters guide / book on Android. I can recommend "Unlocking Android" by mannings.
ExxKA
Developer
Developer
 
Posts: 29
Joined: Tue Nov 03, 2009 7:16 pm
Location: Denmark

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 19 guests