I want to create an Android app as service. No activity no icon. When I hit the run button from android studio the Android service should be shown in the logs. But when I am deleting following line of code to prevent showing app icon , the app doesn't run and shows error. How to resolve this. I am a beginner in android. Any piece of code for example is welcomed.
<category android:name="android.intent.category.LAUNCHER" />
Error it shows as follows
Could not identify launch activity: Default Activity not found
Error while Launching activity.
Service class is as follows
@Override
public IBinder onBind(Intent arg0) {
// TODO Auto-generated method stub
return null;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.d(TAG, "FirstService started");
return START_NOT_STICKY;
}
@Override
public void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
Log.d(TAG, "FirstService destroyed");
}