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
@Configuration | |
@EnableWebSocketMessageBroker | |
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { | |
@Override | |
public void configureMessageBroker(MessageBrokerRegistry config) { | |
config.enableSimpleBroker("/topic"); | |
config.setApplicationDestinationPrefixes("/app"); | |
} |
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
OkHttp D --> POST http://54.229.57.6/auth.php http/1.1 | |
15129 OkHttp D Content-Type: application/x-www-form-urlencoded | |
15129 OkHttp D Content-Length: 247 | |
15129 OkHttp D Authorization: Basic a94a8fe5ccb19ba61c4c0873d391e987982fbbd3:ZGIxMmI5Njk0ZDYzZmFhYjRjMTEzZDg2ZTM5ZWI2ODExYWQ1MWU1NmZmYjAzYWMzODcyNGJlY2Q0MjQ5NWNhNg== | |
15129 OkHttp D username=jhondoe&address=fYdiaRxA2a0%3AAPA91bH2-pxYjzCefR6Lf5g7iL1YlBFQR7lbnkmD3onM6JUc6FvdNK5kX7xSXkvej3lDQvFDvAccqVxoEVA2ThqTczMXX-GiUcqZEL643olQEuDxuJIoze0 | |
nlBmu__AGCMSUGXZwveHn&type=android&priority=1×tamp=2016-06-16T16%3A40%3A53%2B00%3A00 | |
15129 OkHttp D --> END POST (247-byte body) | |
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
curl -H "Content-Type:application/json" -H "Authorization:key=AIzaSyB_zFXRZCd9rmHkPvcC7nAJr9MBJ8ZPmXY" https://fcm.googleapis.com/fcm/send -d '{"to" : "/topics/global", "priority" : "high", "data" : {"rn_notification": {"title" : "Title", "body" : "Lorem ipsum sumstr ipsum lorem ipsum....", "actions": ["Open", "Ignore"], "id" : "327732r237frfds3477"} }}' |
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
RichNotifications.onNewIntent(this, getIntent()); | |
} | |
@Override | |
protected void onResume() { |