public interface IGISApplication

Interface that all applications using the library should implements. It used in content provider. If your application will not implement this interface - the synchronization vector layers with server will not work. If you plan to fix maplib or maplibui libraries, you nee to clone the sources such way:

  • clone maplib and/or maplibui as submodules
git submodule add https://github.com/nextgis/android_maplib.git maplib
git submodule add https://github.com/nextgis/android_maplibui.git maplibui

Modify settings.gradle:

from: include ':app'
to: include ':app', ':maplib', ':maplibui'

Also add https://jitpack.io/ to build.gradle file:

allprojects {
  repositories {
    maven { url "https://jitpack.io" }
dependencies {
  compile 'com.github.User:Repo:Tag'

Note: Expected that project was created via Android studio new project wizard.

Author:Dmitry Baryshnikov Methods addAccount

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

Add account to android account storage

  • name – Account name (must be uniq)
  • url – NextGIS Web Server URL
  • login – User login
  • password – User password
  • token – A token returned from NextGIS Web Server (may be empty string)

true on success or false getAccount

Account getAccount(String accountName)
  • accountName – Account name

Account by its name getAccountLogin

String getAccountLogin(Account account)
  • account – Account object

Account login getAccountPassword

String getAccountPassword(Account account)
  • account – Account object

Account password getAccountUrl

String getAccountUrl(Account account)
  • account – Account object

Account URL getAccountUserData

String getAccountUserData(Account account, String key)

Return some account data

  • account – account object
  • key – key to return

value in user key - value map getAccountsType

String getAccountsType()

Get accounts authenticator type getAuthority

String getAuthority()
Returns:A authority for sync purposes or empty string if not sync anything getGpsEventSource

GpsEventSource getGpsEventSource()
Returns:A GpsEventSource or null if not needed or created in application getLayerFactory

LayerFactory getLayerFactory()

Get LayerFactory getMap

MapBase getMap()
Returns:A MapBase or any inherited classes or null if not created in application removeAccount

AccountManagerFuture<Boolean> removeAccount(Account account)

Remove an account

  • account – Account to remove

An @see AccountManagerFuture which resolves to a Boolean, true if the account has been successfully removed sendEvent

void sendEvent(String category, String action, String label)

Send target event to analytics sendScreen

void sendScreen(String name)

Send screen hit to analytics setPassword

void setPassword(String name, String value)

Change password for account

  • name – Account name (the account must be exist)
  • value – New password setUserData

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

Update account information

  • name – Account name (the account must be exist)
  • key – The account key to change (i.e. URL)
  • value – The new value for key showSettings

void showSettings(String setting)

Show settings Activity or nothing