Created
January 19, 2018 23:25
-
-
Save ToeJamson/c01d92ca9aac9dca399d8c25c7dacf64 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public class LocationPublishPnCallback extends SubscribeCallback { | |
| ... | |
| @Override | |
| public void message(PubNub pubnub, PNMessageResult message) { | |
| if (!message.getChannel().equals(watchChannel)) { | |
| return; | |
| } | |
| try { | |
| Log.d(TAG, "message: " + message.toString()); | |
| Map<String, String> newLocation = JsonUtil.fromJson(message.getMessage().toString(), LinkedHashMap.class); | |
| locationMapAdapter.locationUpdated(newLocation); | |
| } catch (Exception e) { | |
| throw new RuntimeException(e); | |
| } | |
| } | |
| ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment