-
public class ApplicationMetadataCache
-
-
Field Summary
Fields Modifier and Type Field Description private static volatile ApplicationMetadataCacheinstanceprivate StringapplicationNameprivate StringapplicationVersionprivate StringpackageName
-
Method Summary
Modifier and Type Method Description static ApplicationMetadataCachegetInstance(Context context)Returns current application cache. static ApplicationMetadataCachegetInstance(Context context)Returns current application cache. StringgetApplicationName()Retrieves application name from context. StringgetApplicationVersion()Retrieves application version from the context. StringgetPackageName()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.
-
-
-
-