I am trying to make a app that it is only a service.
I know how to make the service and launch it, but I would like to launch the service without an activity layout. I mean, when i launch the app, it is only show the icon in the notify bar.
A service can be started at boot by checking Project - Service properties - Start at boot (the service module should be selected).
You can also call StartService from the activity followed by Activity.Finish.
You can remove the <activity> ... </activity> block for the main activity from the manifest file. The problem is, how to start the service. One solution is as Erel mentioned the "start service at boot" option.
Removing the block is also nice for widget only apps. The app will not be listed in the app list of the launcher and you can only add the widget(s).