Does startService() create a new Service instance or using the existing one?

Does startService() create a new Service instance or using the existing one? For example, in the following code, does it create two UpdateService instances or just one UpdateService instance? Thanks.

    int[] appWidgetIds = new int[] {1, 2};  
    for (int appWidgetId : appWidgetIds) {
        Intent intent = new Intent(context, UpdateService.class);
        intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
        context.startService(intent);
    }


ANSWERS:


If the service is already started, it does not start as second copy, but onStart() is still called on the existing instance. Services are natural singletons -- there is exactly 0 or 1 copy of the service in operation.


The onStart method is deprecated for now, use onStartCommand instead.



 MORE:


 ? How to launch FCM ID Service only after a particular activity is triggered?
 ? Service is being started but OnCreate or OnStart are not being called
 ? Firebase Android Authentication failed: expired_token (Auth token is expired)
 ? when does an android gcm token expire
 ? FCM Token Issue in some android device
 ? FCM - onTokenRefresh() is never called
 ? Does firebase manage user data like device token, bundle id etc at their own when sending push notifications or we have to manage these data?
 ? Firebase FCM token - When to send to server?
 ? FCM - onTokenRefresh() is never called
 ? onTokenRefresh not getting called in signed APK, if previous version of app installed doesn't have FCM implemented