Use init(Context context, String appId, String cognitoId)
to initialize newly created instance of Analytics
class.
where
appId
- Amazon Mobile Analytics App ID.
cognitoId
- Amazon Cognito Identity Pool ID.
Amazon Analytics does not send reported events automatically, instead - developer is responsible for starting/pausing analytics session.
Current library has handy helper methods (pause()
and resume()
) to pause/resume analytics session. The most convenient place to use them are onPause
/onResume
methods of your Activity.