(Object context)
| 37 | private Resources theme; |
| 38 | |
| 39 | public void init(Object context) { |
| 40 | // use two network threads instead of one |
| 41 | updateNetworkThreadCount(2); |
| 42 | |
| 43 | theme = UIManager.initFirstTheme("/theme"); |
| 44 | |
| 45 | // Enable Toolbar on all Forms by default |
| 46 | Toolbar.setGlobalToolbar(true); |
| 47 | |
| 48 | // Pro only feature |
| 49 | Log.bindCrashProtection(true); |
| 50 | |
| 51 | addNetworkErrorListener(err -> { |
| 52 | // prevent the event from propagating |
| 53 | err.consume(); |
| 54 | if(err.getError() != null) { |
| 55 | Log.e(err.getError()); |
| 56 | } |
| 57 | Log.sendLogAsync(); |
| 58 | Dialog.show("Connection Error", "There was a networking error in the connection to " + err.getConnectionRequest().getUrl(), "OK", null); |
| 59 | }); |
| 60 | } |
| 61 | |
| 62 | public void start() { |
| 63 | if(current != null){ |
nothing calls this directly
no test coverage detected