public class

ApplicationMetrics

extends Object
java.lang.Object
   ↳ com.urbanairship.ApplicationMetrics

Class Overview

ApplicationMetrics stores metric information about the application.

Summary

Public Methods
long getLastOpenTimeMillis()
Gets the time of the last open in milliseconds since January 1, 1970 00:00:00.0 UTC.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public long getLastOpenTimeMillis ()

Gets the time of the last open in milliseconds since January 1, 1970 00:00:00.0 UTC.

An application "open" is determined in Analytics by tracking activity start and stops. This ensures that background services or broadcast receivers do not affect this number. This number could be inaccurate if analytic instrumentation is missing for activities when running on Android ICS (4.0) or older.

Returns
  • The time in milliseconds of the last application open, or -1 if the last open has not been detected yet.