Skip to content

Commit

Permalink
Final commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ajsingh1012 committed May 1, 2021
1 parent bea8416 commit 75d5beb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public void onMessageReceived(RemoteMessage remoteMessage) {

// TODO(developer): Handle FCM messages here.
// Not getting messages here? See why this may be: https://goo.gl/39bRNJ
Log.d(TAG, "From: " + remoteMessage.getFrom());
//Log.d(TAG, "From: " + remoteMessage.getFrom());

// Check if message contains a data payload.
if (remoteMessage.getData().size() > 0) {
Log.d(TAG, "Message data payload: " + remoteMessage.getData());
//Log.d(TAG, "Message data payload: " + remoteMessage.getData());

if (/* Check if data needs to be processed by long running job */ true) {
// For long-running tasks (10 seconds or more) use WorkManager.
Expand All @@ -78,7 +78,7 @@ public void onMessageReceived(RemoteMessage remoteMessage) {

// Check if message contains a notification payload.
if (remoteMessage.getNotification() != null) {
Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody());
//Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody());
}

// Also if you intend on generating your own notifications as a result of a received FCM
Expand All @@ -99,7 +99,7 @@ public void onMessageReceived(RemoteMessage remoteMessage) {
*/
@Override
public void onNewToken(String token) {
Log.d(TAG, "Refreshed token: " + token);
//Log.d(TAG, "Refreshed token: " + token);

// If you want to send messages to this application instance or
// manage this apps subscriptions on the server side, send the
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/example/test2/MyWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public MyWorker(@NonNull Context appContext, @NonNull WorkerParameters workerPar
@NonNull
@Override
public Result doWork() {
Log.d(TAG, "Performing long running task in scheduled job");
//Log.d(TAG, "Performing long running task in scheduled job");
// TODO(developer): add long running task here.
return Result.success();
}
Expand Down

0 comments on commit 75d5beb

Please sign in to comment.