Breaking News

android – How could realm activity migration be executed after an activity starts?-Exceptionshub

Questions: I have the realm init and configuration setup in the Application’s onCreate method: public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); initDagger2(); initRealm(); setLoggerContext(); startLifecycleObserver(); startActivityLifecycleCallback(); initFirebasePushNotifications(); } } initRealm() setups the Realm configuration, which is correctly configured. I have my main activity perform some …

Read More »

java – Managing reconnections to MQTT server-Exceptionshub

Questions: I do connect to MQTT server by using MqttAndroidClient: doReconnect() { ..... mqttAndroidClient.connect(mqttConnectOptions, null, new IMqttActionListener() { @Override public void onSuccess(IMqttToken asyncActionToken) { Timber.tag(Utils.TIMBER_TAG).v( "onSuccess " + MqttHelper.toString(asyncActionToken)); DisconnectedBufferOptions disconnectedBufferOptions = new DisconnectedBufferOptions(); disconnectedBufferOptions.setBufferEnabled(false); disconnectedBufferOptions.setBufferSize(100); disconnectedBufferOptions.setPersistBuffer(false); disconnectedBufferOptions.setDeleteOldestMessages(false); mqttAndroidClient.setBufferOpts(disconnectedBufferOptions); subscribeToTopic(top); showMainActivity("Connect OK"); } @Override public void onFailure(IMqttToken asyncActionToken, Throwable e) …

Read More »