AnalyticsService

  • AnalyticsService is a background service responsible for Google Analytics data collection, processing, and dispatch in Android apps.

  • It must be declared and enabled in the AndroidManifest.xml for proper functionality, ensuring data security by restricting external access.

  • This service operates independently of the app's UI, utilizing Android service lifecycle methods to manage operations, and minimizing performance impact.

  • Key methods include callServiceStopSelfResult for stopping the service and onBind for communication with other app components.

  • AnalyticsService inherits from the Android Service class, gaining access to system resources and functionalities.

public final class AnalyticsService extends Service
implements ServiceUtil.AnalyticsService

A Service used by Google Analytics. It will only be used when the service is correctly declared in AndroidManifest.xml:

<manifest>
   <application>
     <!-- ... -->

     <service android:name="com.google.android.gms.analytics.AnalyticsService"
         android:enabled="true"
         android:exported="false"/>

     <!-- ... -->
   </application>
 </manifest>
 

Inherited Constant Summary

Public Method Summary

boolean
IBinder
onBind(Intent intent)

Inherited Method Summary

Public Methods

public boolean callServiceStopSelfResult (int startId)

public IBinder onBind (Intent intent)