Create MrMailbox object.

This commit is contained in:
B. Petersen
2016-09-20 22:21:42 +02:00
parent d86f4b7cc0
commit 2e5334eca7
@@ -53,6 +53,8 @@ public class ApplicationLoader extends Application {
public static volatile boolean isScreenOn = false;
public static volatile boolean mainInterfacePaused = true;
public static long hMailbox = 0;
public static boolean isCustomTheme() {
return isCustomTheme;
}
@@ -289,6 +291,10 @@ public class ApplicationLoader extends Application {
ConnectionsManager.native_setJava(Build.VERSION.SDK_INT == 14 || Build.VERSION.SDK_INT == 15);
new ForegroundDetector(this);
// create a MrMailbox object; as android stops the App by just killing it, we do never call MrMailboxUnref()
// however, we may want to to have a look at onPause() eg. of activities (eg. for flushing data, if needed)
hMailbox = MrMailbox.MrMailboxNew();
applicationHandler = new Handler(applicationContext.getMainLooper());
startPushService();