GISApplication

public abstract class GISApplication extends Application implements IGISApplication

This is a base application class. Each application should inherited their base application from this class. The main application class stored some singleton objects.

Author:Dmitry Baryshnikov (aka Bishop), bishop.dev@gmail.com

Fields

mAccountManager

protected AccountManager mAccountManager

mGpsEventSource

protected GpsEventSource mGpsEventSource

mMap

protected MapDrawable mMap

mSharedPreferences

protected SharedPreferences mSharedPreferences

Methods

addAccount

public boolean addAccount(String name, String url, String login, String password, String token)

getAccount

public Account getAccount(String accountName)

getAccountLogin

public String getAccountLogin(Account account)

getAccountPassword

public String getAccountPassword(Account account)

getAccountUrl

public String getAccountUrl(Account account)

getAccountUserData

public String getAccountUserData(Account account, String key)

getGpsEventSource

public GpsEventSource getGpsEventSource()

getLayerFactory

public LayerFactory getLayerFactory()

getMap

public MapBase getMap()

getMapBackground

public Bitmap getMapBackground()

getThemeId

protected int getThemeId(boolean isDark)

isAccountManagerValid

protected boolean isAccountManagerValid()

onCreate

public void onCreate()

onFirstRun

protected void onFirstRun()

Executed then application first run. One can create some data here (some layers, etc.).

removeAccount

public AccountManagerFuture<Boolean> removeAccount(Account account)

setPassword

public void setPassword(String name, String value)

setUserData

public void setUserData(String name, String key, String value)