|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.drismo.model.Config
public class Config
This class keeps track of all the preferences for the application.
Field Summary | |
---|---|
private static java.lang.String |
currentLangTitle
|
private static boolean |
dimScreen
|
private static boolean |
gpsExists
|
private static java.lang.String |
languageCode
|
private static boolean |
logGps
|
private static boolean |
powerSaver
|
private static int |
prefMonitor
|
private static boolean |
replyCall
|
private static java.lang.String |
replyMsg
|
private static boolean |
replySMS
|
private static float |
speedConv
|
private static java.lang.String |
speedUnit
|
private static int |
ttsFrequency
|
private static boolean |
useTts
|
Constructor Summary | |
---|---|
Config()
|
Method Summary | |
---|---|
static boolean |
autoReplyCall()
Check whether auto reply on is activated for incoming calls or not. |
static boolean |
autoReplySms()
Check whether auto reply on is activated for incoming messages or not. |
static boolean |
deviceHasGps()
Check if a GPS is present in the device. |
static java.lang.String |
getAutoReplyMsg()
Gets the message that will be sent as auto-reply to incoming requests. |
static boolean |
getDimScreen()
Check whether the dim screen setting is enabled or not. |
static java.lang.String |
getLangSummaryText()
Get the description text for the language preference. |
static java.lang.String |
getLanguageCode()
Get the language code to set as locale. |
static int |
getPrefMonitor()
Get the preferred monitor style. |
static float |
getSpeedConv()
Gets the speed conversion constant. |
static java.lang.String |
getSpeedUnit()
Get the preferred speed unit. |
static int |
getTtsMinuteFrequency()
Get the frequency for the TTS feature. |
static void |
initializePreferences(android.content.Context c,
android.content.SharedPreferences prefs)
Set all preferences. |
static boolean |
logGps()
Check whether GPS-logging is activated or not. |
static boolean |
powerSaverOn()
Check whether the power saver is activated or not. |
static void |
setAutoReplyCall(boolean reply)
Sets the boolean that decides whether or not to send auto-reply message on incoming calls. |
static void |
setAutoReplyMsg(java.lang.String msg)
Sets the message that will be sent as auto-reply to incoming requests. |
static void |
setAutoReplySms(boolean reply)
Sets the boolean that decides whether or not to send auto-reply message on incoming messages. |
static void |
setConfigLocale(android.content.Context c,
java.lang.String lang)
Changing default Locale , to activate selected language in the application. |
static void |
setDimScreen(boolean dim)
Set the boolean for the dim screen setting. |
static void |
setGpsExists(boolean gps)
Store information about whether or not the device has GPS. |
static void |
setLangCode(java.lang.String lang)
Set language code. |
static void |
setLangSummaryText(java.lang.String lang)
Set the description text for the language preference. |
static void |
setLogGps(boolean log)
Enable/Disable GPS-logging. |
static void |
setPowerSaver(boolean ps)
Enable/Disable power saver. |
static void |
setPrefMonitor(int monitor)
Setting what monitor is default. |
static void |
setSpeedConv(java.lang.String unit)
Sets the speed conversion constant |
static void |
setSpeedUnit(java.lang.String unit)
Set preferred speed measurement unit. |
static void |
setTtsFrequency(int freq)
Set how often to give feedback via TTS. |
static void |
setUseTts(boolean tts)
Set the boolean for the TTS setting. |
static boolean |
useTts()
Check if the TTS feature is enabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static boolean replySMS
private static boolean replyCall
private static boolean logGps
private static boolean powerSaver
private static boolean dimScreen
private static boolean gpsExists
private static boolean useTts
private static int prefMonitor
private static java.lang.String replyMsg
private static java.lang.String languageCode
private static java.lang.String currentLangTitle
private static java.lang.String speedUnit
private static float speedConv
private static int ttsFrequency
Constructor Detail |
---|
public Config()
Method Detail |
---|
public static boolean autoReplySms()
public static boolean autoReplyCall()
public static boolean logGps()
public static boolean powerSaverOn()
public static java.lang.String getAutoReplyMsg()
public static java.lang.String getLangSummaryText()
public static java.lang.String getLanguageCode()
public static int getPrefMonitor()
public static int getTtsMinuteFrequency()
public static boolean getDimScreen()
public static boolean useTts()
public static boolean deviceHasGps()
public static float getSpeedConv()
public static java.lang.String getSpeedUnit()
public static void setAutoReplySms(boolean reply)
reply
- True if the auto-reply setting is activated for messages. False otherwise.public static void setAutoReplyCall(boolean reply)
reply
- True if the auto-reply setting is activated for calls. False otherwise.public static void setLangCode(java.lang.String lang)
lang
- The language codepublic static void setLangSummaryText(java.lang.String lang)
lang
- The descriptionpublic static void setAutoReplyMsg(java.lang.String msg)
msg
- The messagepublic static void setLogGps(boolean log)
log
- True if GPS should be logged. False otherwise.public static void setPowerSaver(boolean ps)
ps
- True if power saver should be enabled. False otherwise.public static void setPrefMonitor(int monitor)
monitor
- Integer value of monitor to set as default.public static void setDimScreen(boolean dim)
dim
- True if dim screen is allowed. False otherwise.public static void setUseTts(boolean tts)
tts
- True if the setting has been enabled. False otherwise.public static void setTtsFrequency(int freq)
freq
- Frequency given in minutes.public static void setGpsExists(boolean gps)
gps
- True if the device has GPS. False otherwise.public static void setSpeedConv(java.lang.String unit)
unit
- if km/h set 3.6f, else mph set 2.24fpublic static void setSpeedUnit(java.lang.String unit)
unit
- The short name for the preferred speed unit. (km/t, mph or m/s)public static void initializePreferences(android.content.Context c, android.content.SharedPreferences prefs)
c
- The contextprefs
- The SharedPreferences object.public static void setConfigLocale(android.content.Context c, java.lang.String lang)
Locale
, to activate selected language in the application.
c
- the contextlang
- Abbreviation for the language. (i.e. 'en' for english or 'no' for norwegian.)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |