-
public class ApplicationMetadataCache
-
-
Field Summary
Fields Modifier and Type Field Description private static volatile ApplicationMetadataCache
instance
private String
applicationName
private String
applicationVersion
private String
packageName
-
Method Summary
Modifier and Type Method Description static ApplicationMetadataCache
getInstance(Context context)
Returns current application cache. static ApplicationMetadataCache
getInstance(Context context)
Returns current application cache. String
getApplicationName()
Retrieves application name from context. String
getApplicationVersion()
Retrieves application version from the context. String
getPackageName()
Retrieves package name from the context. -
-
Method Detail
-
getInstance
static ApplicationMetadataCache getInstance(Context context)
Returns current application cache. This instance is a singleton since we can only operatein a single application scope.
- Parameters:
context
- Application context
-
getInstance
static ApplicationMetadataCache getInstance(Context context)
Returns current application cache. This instance is a singleton since we can only operatein a single application scope.
- Parameters:
context
- Application context
-
getApplicationName
String getApplicationName()
Retrieves application name from context. The name will be cached over checks
-
getApplicationVersion
String getApplicationVersion()
Retrieves application version from the context. If the version name is not defined, the version code will be used instead.
-
getPackageName
String getPackageName()
Retrieves package name from the context.
-
-
-
-