Created
June 21, 2018 09:26
-
-
Save nkenna/7a42b3c359210738bd66ef8de24c0583 to your computer and use it in GitHub Desktop.
Code snippet: Requesting for Data on Startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.......... | |
//payloads | |
String sensors_Data = "get data"; | |
else if (status.getCategory() == PNStatusCategory.PNConnectedCategory){ | |
pp.pubnubPublish(sensors_Data, SENSORS); | |
if (status.getCategory() == PNStatusCategory.PNConnectedCategory){ | |
connectProgress(Color.GREEN, "Connected"); | |
}else if (status.getCategory() == PNStatusCategory.PNReconnectedCategory){ | |
pp.pubnubPublish(sensors_Data, SENSORS); | |
connectProgress(Color.GREEN, "Reconnected"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment