-
public class Utils.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final StringTHREAD_PREFIXprivate final BooleanDEFAULT_COLLECT_DEVICE_IDprivate final IntegerDEFAULT_FLUSH_QUEUE_SIZEpublic final static Utils.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final StringtoISO8601String(Date date)Returns dateformatted as yyyy-MM-ddThh:mm:ss.final DateparseISO8601Date(String date)final SharedPreferencesgetSeineTimeSharedPreferences(Context context, String tag)final JSONObjecttoJsonObject(Map<String, ?> map)final BooleanhasPermission(Context context, String permission)final <T extends Any> TgetSystemService(Context context, String serviceConstant)Returns the system service for the given string. final BooleanisConnected(Context context)final StringgetResourceString(Context context, String name)Get the string resource for the given key. final PackageInfogetPackageInfo(Context context)Returns the referrer who started the Activity. final BooleanisOnClassPath(String className)Return true if a class with the given name is found. final UnitcreateDirectory(File location)final IntegerbooleanToInt(Boolean b)final StringgetTHREAD_PREFIX()final BooleangetDEFAULT_COLLECT_DEVICE_ID()final IntegergetDEFAULT_FLUSH_QUEUE_SIZE()-
-
Method Detail
-
toISO8601String
final String toISO8601String(Date date)
Returns
dateformatted as yyyy-MM-ddThh:mm:ss.sssZ
-
parseISO8601Date
final Date parseISO8601Date(String date)
-
getSeineTimeSharedPreferences
final SharedPreferences getSeineTimeSharedPreferences(Context context, String tag)
-
toJsonObject
final JSONObject toJsonObject(Map<String, ?> map)
-
hasPermission
final Boolean hasPermission(Context context, String permission)
-
getSystemService
final <T extends Any> T getSystemService(Context context, String serviceConstant)
Returns the system service for the given string.
-
isConnected
final Boolean isConnected(Context context)
-
getResourceString
final String getResourceString(Context context, String name)
Get the string resource for the given key. Returns null if not found.
-
getPackageInfo
final PackageInfo getPackageInfo(Context context)
Returns the referrer who started the Activity.
-
isOnClassPath
final Boolean isOnClassPath(String className)
Return true if a class with the given name is found.
-
createDirectory
final Unit createDirectory(File location)
-
booleanToInt
final Integer booleanToInt(Boolean b)
-
getTHREAD_PREFIX
final String getTHREAD_PREFIX()
-
getDEFAULT_COLLECT_DEVICE_ID
final Boolean getDEFAULT_COLLECT_DEVICE_ID()
-
getDEFAULT_FLUSH_QUEUE_SIZE
final Integer getDEFAULT_FLUSH_QUEUE_SIZE()
-
-
-
-