Created
September 28, 2016 13:18
-
-
Save anonymous/4809535250702a647b0e359998e15121 to your computer and use it in GitHub Desktop.
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
package com.developer.client.APPNAME.receiver; | |
/** | |
* Created by FB on 20.9.16. | |
*/ | |
import android.content.Intent; | |
import android.content.Context; | |
import android.util.Log; | |
import android.widget.Toast; | |
import com.backendless.push.BackendlessPushService; | |
public class KPBackendlessPushService extends BackendlessPushService | |
{ | |
@Override | |
public void onRegistered( Context context, String registrationId ) | |
{ | |
//Toast.makeText( context, "device registered" + registrationId, Toast.LENGTH_SHORT).show(); | |
} | |
@Override | |
public void onUnregistered( Context context, Boolean unregistered ) | |
{ | |
//Toast.makeText( context, "device unregistered", Toast.LENGTH_SHORT).show(); | |
} | |
@Override | |
public boolean onMessage( Context context, Intent intent ) | |
{ | |
String message = intent.getStringExtra( "message" ); | |
Log.v("rnfTag", "message: " + message); | |
//Toast.makeText( context, "Push message received. Message: " + message, Toast.LENGTH_LONG ).show(); | |
return true; | |
} | |
@Override | |
public void onError( Context context, String message ) | |
{ | |
Log.v("rnfTag", message ); | |
// throw new RuntimeException( message ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment