java.lang.NullPointerException: Attempt to invoke virtual method 'org.eclipse.paho.client.mqttv3.IMqttDeliveryToken org.eclipse.paho.android.service.MqttAndroidClient.publish(java.lang.String, org.eclipse.paho.client.mqttv3.MqttMessage)' on a null object reference
at org.turbo.beaconmqtt.BeaconApplication.mqttPublish(BeaconApplication.java:388)
at org.turbo.beaconmqtt.BeaconApplication.mqttPublishExitRegion(BeaconApplication.java:413)
at org.turbo.beaconmqtt.BeaconApplication.didExitRegion(BeaconApplication.java:247)
at org.altbeacon.beacon.IntentHandler.convertIntentsToCallbacks(IntentHandler.java:78)
at org.altbeacon.beacon.BeaconLocalBroadcastProcessor$1.onReceive(BeaconLocalBroadcastProcessor.java:89)
at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:313)
at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:121)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:6635)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
java.lang.NullPointerException: Attempt to invoke virtual method 'org.eclipse.paho.client.mqttv3.IMqttDeliveryToken org.eclipse.paho.android.service.MqttAndroidClient.publish(java.lang.String, org.eclipse.paho.client.mqttv3.MqttMessage)' on a null object reference at org.turbo.beaconmqtt.BeaconApplication.mqttPublish(BeaconApplication.java:388) at org.turbo.beaconmqtt.BeaconApplication.mqttPublishExitRegion(BeaconApplication.java:413) at org.turbo.beaconmqtt.BeaconApplication.didExitRegion(BeaconApplication.java:247) at org.altbeacon.beacon.IntentHandler.convertIntentsToCallbacks(IntentHandler.java:78) at org.altbeacon.beacon.BeaconLocalBroadcastProcessor$1.onReceive(BeaconLocalBroadcastProcessor.java:89) at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:313) at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:121) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:6635) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)