Android Open Source - FloatCamera Push Message Receiver






From Project

Back to project page FloatCamera.

License

The source code is released under:

Apache License

If you think the Android project FloatCamera listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.kenai.camera;
/* www .j  a  v  a 2 s  . co  m*/

import com.kenai.function.message.XLog;
import com.kenai.function.message.XToast;

import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * Push??????receiver
 */
public abstract class PushMessageReceiver extends BroadcastReceiver {
//  public static final String TAG = PushMessageReceiver.class.getSimpleName();
//  AlertDialog.Builder builder;
//
//  /**
//   * 
//   * 
//   * @param context
//   *            Context
//   * @param intent
//   *            ???????ntent
//   */
//  @Override
//  public void onReceive(final Context context, Intent intent) {
//
//    if (intent.getAction().equals(PushConstants.ACTION_MESSAGE)) {
//      // ????push????
//      String message = intent.getExtras().getString(
//          PushConstants.EXTRA_PUSH_MESSAGE_STRING);
//      if (message != null) {
//        XToast.xToast(context, message);
//
//        Intent intent2 = new Intent(CameraService.BROADCAST);
//        intent2.putExtra("value",
//            CameraService.ACTION_TAKEPICTUR_NORMAL);
//        context.sendBroadcast(intent2);
//
//      }
//      // // PushConstants.EXTRA_EXTRA??????????????????????? JSON
//      // // ????//????????????????????
//      // String content = intent.getExtras().getString(
//      // PushConstants.EXTRA_EXTRA);
//      // try {
//      // JSONObject json=new JSONObject(content);
//      // } catch (JSONException e) {
//      // // TODO ?????? catch ???
//      // e.printStackTrace();
//      // }
//      // XLog.xLog(content);
//      //
//      // XToast.xToast(context, message);
//
//    } else if (intent.getAction().equals(PushConstants.ACTION_RECEIVE)) {
////      XToast.xToast(context, "bind");
//      // ???? bind??setTags?????????????
//      final String method = intent
//          .getStringExtra(PushConstants.EXTRA_METHOD);
//      final int errorCode = intent
//          .getIntExtra(PushConstants.EXTRA_ERROR_CODE,
//              PushConstants.ERROR_SUCCESS);
//      final String content = new String(
//          intent.getByteArrayExtra(PushConstants.EXTRA_CONTENT));
//      XLog.xLog(TAG+">>>"+"onMessage: method: " + method);
//      XLog.xLog(TAG+">>>"+"onMessage: result : " + errorCode);
//      XLog.xLog(TAG+">>>"+"onMessage: content : " + content);
//      // ???? method?????????????????? errorCode ??????????????????????????
//      // ?? access token??
//    }
//    // else if (intent.getAction().equals(
//    // PushConstants.ACTION_RECEIVER_NOTIFICATION_CLICK)) {
//    // // ????
//    // String title = intent
//    // .getStringExtra(PushConstants.EXTRA_NOTIFICATION_TITLE);
//    // // ????
//    // String content = intent
//    // .getStringExtra(PushConstants.EXTRA_NOTIFICATION_CONTENT);
//    // // PushConstants.EXTRA_EXTRA??????????????????????? JSON
//    // // ????//????????????????????
//    // String conten2 = intent.getExtras().getString(
//    // PushConstants.EXTRA_EXTRA);
//    // }
//  }

}




Java Source Code List

cc.kenai.mainlib.face.XFace.java
com.kenai.camera.CameraBroadcast.java
com.kenai.camera.CameraEnv.java
com.kenai.camera.CameraFaceService.java
com.kenai.camera.CameraPreview.java
com.kenai.camera.CameraService.java
com.kenai.camera.CameraTake_pictureService.java
com.kenai.camera.CameraTime.java
com.kenai.camera.KenaiActivity.java
com.kenai.camera.KenaiBroadcast.java
com.kenai.camera.KenaiService.java
com.kenai.camera.PushMessageReceiver.java
com.kenai.camera.StatebarService.java
com.kenai.function.camera.XCamera.java