java.lang.Object |
↳ |
Application |
|
↳ |
com.mapsted.MapstedBaseApplication |
Class Overview
If you have multiple activities in your project, then use this class as your application class (or derive this class if you already have your own application class).
The main purpose of this class is to hold a single coreApi for your app. This class will keep track of your activities. Use setCoreApi() to store and getCoreApi() from different activities to retrieve the same coreApi instance.
When the last activity is destroyed, the coreApi is destroyed as well. Until then, this coreApi can be re-used by other activities by calling Activity::getApplication() and casting it to this class type.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
MapstedBaseApplication
()
Public Methods
public
CoreApi
getCoreApi
(Context context)
public
void
setCoreApi
(CoreApi coreApi)