Back to project page CloudyPhone.
The source code is released under:
MIT License
If you think the Android project CloudyPhone listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.cloudyphone.android.controller.receivers; /*from www. j a v a 2 s.c om*/ import org.json.JSONException; import org.json.JSONObject; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.cloudyphone.android.utils.Logger; public abstract class PushReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Logger.print(this, "received message"); // get the data object and call execute try { JSONObject data = new JSONObject(intent.getExtras().getString( "com.parse.Data")); execute(context, data); } catch (JSONException e) { // error in push message, ignore this } } public abstract void execute(Context context, JSONObject data); }