com.funambol.util
Class BlackberryHelper

java.lang.Object
  extended by com.funambol.util.BlackberryHelper

public class BlackberryHelper
extends java.lang.Object


Field Summary
static int CONFIG_NONE
          no config has been set. value = -1
static int CONFIG_REFUSED
          a working config has been found, but user refused to use it
 
Constructor Summary
BlackberryHelper()
           
 
Method Summary
static boolean areConfigsEmpty()
           
static java.lang.String[] getAllActiveServiceBookApns()
           
static java.lang.String getAPNFromConfig(int configId)
           
static int getConfigCount()
           
static java.lang.String getConfigsDescription()
           
static java.lang.String getConfigurationDescription(int configId)
          method that return a string containing given config id description
static ConnectionHandler getConnectionHandler()
           
static java.lang.String getOptions(int retry)
           
static java.lang.String getSavedConfigDescription()
           
static int getSavedConfigID()
           
static java.lang.String getServiceBookApn()
           
static void initConfigs()
           
static boolean isOkToUseConfig(int configNumber)
           
static boolean isSimulator()
           
static void removeSavedConfig()
          remove saved config, if present.
static void saveCurrentConfig()
           
static void setConnectionHandler(ConnectionHandler handler)
           
static boolean shouldAskUserBeforeConnecting()
           
static boolean workingConfigHasBeenFound()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_NONE

public static int CONFIG_NONE
no config has been set. value = -1


CONFIG_REFUSED

public static int CONFIG_REFUSED
a working config has been found, but user refused to use it

Constructor Detail

BlackberryHelper

public BlackberryHelper()
Method Detail

shouldAskUserBeforeConnecting

public static boolean shouldAskUserBeforeConnecting()
Returns:
true if app should ask the user before connecting with a non-empty apn. currently this is done for non-us operators

getSavedConfigID

public static int getSavedConfigID()

getAPNFromConfig

public static java.lang.String getAPNFromConfig(int configId)

setConnectionHandler

public static void setConnectionHandler(ConnectionHandler handler)

getConnectionHandler

public static ConnectionHandler getConnectionHandler()

getConfigurationDescription

public static java.lang.String getConfigurationDescription(int configId)
method that return a string containing given config id description

Parameters:
configId - the config id
Returns:
given config descritpion

getSavedConfigDescription

public static java.lang.String getSavedConfigDescription()

getConfigCount

public static int getConfigCount()

isSimulator

public static boolean isSimulator()

saveCurrentConfig

public static void saveCurrentConfig()

removeSavedConfig

public static void removeSavedConfig()
remove saved config, if present. this method is used when we're unable to connect, to avoid trying the same configuration every time


workingConfigHasBeenFound

public static boolean workingConfigHasBeenFound()
Returns:
true if a working config has been found

getOptions

public static java.lang.String getOptions(int retry)

areConfigsEmpty

public static boolean areConfigsEmpty()
Returns:
true if all config are equals to default config (i.e. no sb / Magic Table entries have been found)

isOkToUseConfig

public static boolean isOkToUseConfig(int configNumber)

getServiceBookApn

public static java.lang.String getServiceBookApn()
Returns:
something

getAllActiveServiceBookApns

public static java.lang.String[] getAllActiveServiceBookApns()

initConfigs

public static void initConfigs()

getConfigsDescription

public static java.lang.String getConfigsDescription()
Returns:
a string describing current configs


Copyright © 2006 Funambol.