Android之极光推送发送自定义消息


Android端实现主要代码:

<span style="font-size:14px;">import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

import org.json.JSONException;
import org.json.JSONObject;

import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.NotificationCompat;

import com.mine.xinlangapp.R;
import com.mine.xinlangapp.activity.BaseActivity;

import cn.jpush.android.api.JPushInterface;
/**
 * 自定义接收器
 * 
 * 如果不定义这个 Receiver,则:
 * 1) 默认用户会打开主界面
 * 2) 接收不到自定义消息
 */
public class MyReceiver extends BroadcastReceiver {
	private Bitmap bitmap = null;
	private NotificationManager notifyManager = null; 
	private NotificationCompat.Builder notifyBuilder = null;
	private Notification notification = null;
    private String url = "";
	@SuppressLint("HandlerLeak")
	private Handler handler = new Handler(){
		@Override
		public void handleMessage(Message msg){
			if(bitmap!=null){
				notifyBuilder.setLargeIcon(bitmap);
			}else{
				notifyBuilder.setSmallIcon(R.drawable.sina);
			}
			notification = notifyBuilder.build();
			notification.defaults |= Notification.DEFAULT_SOUND;
			notification.defaults |= Notification.DEFAULT_VIBRATE;
			notifyManager.notify(1000, notification);
		}
	};
	@SuppressLint("InflateParams")
	@Override
	public void onReceive(Context context, Intent intent) {
        Bundle bundle = intent.getExtras();
        /*
        //  自定义样式放在init()之后.
        CustomPushNotificationBuilder builder=new CustomPushNotificationBuilder(
       		 context.getApplicationContext(),
       		 R.layout.customer_notitfication_layout, 
       		 R.id.icon, R.id.title, R.id.text);
        builder.layoutIconDrawable=R.drawable.menu_home;  //下拉状态时显示的通知图标.
        builder.layout = R.layout.customer_notitfication_layout;
        JPushInterface.setPushNotificationBuilder(2, builder);
        */
        
        if (JPushInterface.ACTION_MESSAGE_RECEIVED.equals(intent.getAction())) {
        	/*
        	//接收到推送下来的自定义消息,开启服务执行耗时的操作
        	Intent i = new Intent(context, MyService.class);
        	i.putExtras(bundle);
        	context.startService(i);
        	*/
        	processCustomMessage(context, bundle);
        }else if(JPushInterface.ACTION_NOTIFICATION_RECEIVED.equals(intent.getAction())){
        	
        }else if (JPushInterface.ACTION_NOTIFICATION_OPENED.equals(intent.getAction())) {
        	Intent i = new Intent(context, BaseActivity.class);
        	bundle.putBoolean("push", true);
        	i.putExtras(bundle);
        	//i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        	i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP );
        	context.startActivity(i);
        } 
	}
	
	private void processCustomMessage(Context context, Bundle bundle){
		notifyManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
		notifyBuilder = new NotificationCompat.Builder(context);
		
		String title = bundle.getString(JPushInterface.EXTRA_TITLE);
		String message = bundle.getString(JPushInterface.EXTRA_MESSAGE);
        String extras = bundle.getString(JPushInterface.EXTRA_EXTRA);
        //自定义信息: 获取 
        if (extras != null) {  
            try {  
                JSONObject object = new JSONObject(extras);  
                url = object.optString("src");
            } catch (JSONException e) {  
                e.printStackTrace();  
            }  
        }  
    	Intent i = new Intent(context, BaseActivity.class);
    	bundle.putBoolean("push", true);
    	i.putExtras(bundle);
    	PendingIntent pi = PendingIntent.getActivity(context, 1000, i, PendingIntent.FLAG_UPDATE_CURRENT);
        
    	notifyBuilder.setContentTitle(title);
        notifyBuilder.setContentText(message);
        notifyBuilder.setContentIntent(pi);
        notifyBuilder.setAutoCancel(true);
        
		new Thread(new Runnable() {
			@Override
			public void run() {
				bitmap = returnBitMap(url);
				handler.sendEmptyMessage(1);
			}
		}).start();
		
		handler.sendEmptyMessage(1);  //这里要先发送一次,因为</span><span style="font-size:14px;">onReceive</span><span style="font-size:14px;">方法实现不可以超过10秒,获取图片是耗时的,然而Notification没有图片通知是发送不了的。
	}
	//以Bitmap的方式获取一张图片
	public Bitmap returnBitMap(String url){
		URL myFileUrl = null;
		Bitmap bitmap = null;
		try{
			myFileUrl = new URL(url);
		}catch(MalformedURLException e){
			e.printStackTrace();
		}
		try{
			HttpURLConnection conn = (HttpURLConnection) myFileUrl.openConnection();
			conn.setDoInput(true);
			conn.connect();
			InputStream is = conn.getInputStream();
			bitmap = BitmapFactory.decodeStream(is);
			is.close();
		}catch(IOException e){
			e.printStackTrace();
		}
		return bitmap;
	}
}

</span>

服务器端java代码:

<span style="font-size:14px;">import java.util.HashMap;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import cn.jpush.api.ErrorCodeEnum;
import cn.jpush.api.JPushClient;
import cn.jpush.api.MessageResult;

public class JPushClientExample {
	private static final String appKey ="43bbac097a385c25c157e385";	//必填,例如</span><span style="font-size:14px;">43bbac097a385c25c157e385</span><span style="font-size:14px;">
	private static final String masterSecret = "90ac96cf260c77e64cc2004b";//"</span><span style="font-size:14px;">90ac96cf260c77e64cc2004b</span><span style="font-size:14px;">";//必填,每个应用都对应一个masterSecret
	private static JPushClient jpush = null;
	/**
	 * 保存离线的时长。秒为单位。最多支持10天(864000秒)。
	 * 0 表示该消息不保存离线。即:用户在线马上发出,当前不在线用户将不会收到此消息。
	 * 此参数不设置则表示默认,默认为保存1天的离线消息(86400秒)。
	 */
	private static long timeToLive = 60 * 60 * 24;  
	private static String top_href = "";
	
//	public static void main(String[] args) {
	public void main(){
		/*
		 * Example1: 初始化,默认发送给android和ios,同时设置离线消息存活时间
		 * jpush = new JPushClient(masterSecret, appKey, timeToLive);
		 */
		/*		
		 * Example2: 只发送给android
		 * jpush = new JPushClient(masterSecret, appKey, DeviceEnum.Android);
		 */
		/*
		 * Example3: 只发送给IOS
		 * jpush = new JPushClient(masterSecret, appKey, DeviceEnum.IOS);
		 */
		/*
		 * Example4: 只发送给android,同时设置离线消息存活时间
		 * jpush = new JPushClient(masterSecret, appKey, timeToLive, DeviceEnum.Android);
		 */
		jpush = new JPushClient(masterSecret, appKey, timeToLive);
		/*
		 * 是否启用ssl安全连接, 可选
		 * 参数:启用true, 禁用false,默认为非ssl连接
		 */
		//jpush.setEnableSSL(true);

		Timer timer = new Timer();
		//在1秒后执行此任务,每次间隔半小时,如果传递一个Data参数,就可以在某个固定的时间执行这个任务
		timer.schedule(new MyTask(), 1000, 1800*1000);  
	}
	
	private static class MyTask extends TimerTask{
		@Override
		public void run() {
			Map<String, String> map = getNews();
			String href = map.get("href");
			if(!top_href.equals(href)){     //判断与上次发送的是否相同,不相同就推送
				top_href = href;
				//测试发送消息或者通知
				testSend(map);
			}
		}
	}
	
	private static Map<String, String> getNews(){
		Document doc = null;
		Map<String, String> map = new HashMap<String, String>();
        try {
        	 doc = Jsoup.connect("http://news.sina.cn/").get();
             Elements ListDiv = doc.getElementsByAttributeValue("class","carditems");
 			for (int i = 0; i<ListDiv.select("dl").size() ; i++) {
 				Element a = ListDiv.select("a").get(i);
 				String href = a.attr("href"); 
 				Element dl = ListDiv.select("dl").get(i);
 				Element dd = dl.select("dd").get(0);
 				Elements dt = dl.getElementsByTag("img");
 				Elements h3 = dd.select("h3");    //标题
 				Elements h4 = dd.select("h4");	//内容
 				String title = h3.text();
 				String fu_title = h4.text();
 				String url = dt.attr("src"); // 图片链接
 				
 				if(fu_title!=null && !fu_title.equals("")){
	        			map.put("src", url);
	        			map.put("title", title);
	        			map.put("fu_title", fu_title);
	        			map.put("href", href);
	        			break;
 				}
 			}
        } catch (Exception e) {
            e.printStackTrace();
        }
        return map;
	}

	private static void testSend(Map<String, String> map) {
		// 在实际业务中,建议 sendNo 是一个你自己的业务可以处理的一个自增数字。
		// 除非需要覆盖,请确保不要重复使用。详情请参考 API 文档相关说明。
		int sendNo = getRandomSendNo();
		//String msgTitle = "+;//jpush\"\"";
		//String msgContent = "\\&;w\"\"a--【\npush】";
		
		String href = map.get("href");
		String msgTitle = map.get("title");
		String msgContent=map.get("fu_title");
		String url = map.get("src");    //图片地址
		
		/*
		 * IOS设备扩展参数,
		 * 设置badge,设置声音
		 */
		Map<String, Object> extra = new HashMap<String, Object>();
		extra.put("href", href);
		extra.put("src", url);
	//	IOSExtra iosExtra = new IOSExtra(10, "WindowsLogonSound.wav");
	//	extra.put("ios", iosExtra);

		//对所有用户发送通知, 更多方法请参考文档    message字段
	//	MessageResult msgResult = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent, 2, extra);
		MessageResult msgResult = jpush.sendCustomMessageWithAppKey(sendNo, msgTitle, msgContent, "a", extra);  //发送自定义消息
		//MessageResult msgResult = jpush.sendCustomMessageWithAppKey(sendNo,msgTitle, msgContent);
		//MessageResult msgResult  = jpush.sendNotificationWithAlias(sendNo, "a", msgTitle, msgContent);

		//覆盖指定msgId的消息,msgId可以从msgResult.getMsgid()获取。
		//MessageResult msgResult = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent, 0, extra,msgResult.getMsgid());

		if (null != msgResult) {
			System.out.println("服务器返回数据: " + msgResult.toString());
			if (msgResult.getErrcode() == ErrorCodeEnum.NOERROR.value()) {
				System.out.println(String.format("发送成功, sendNo= %s,messageId= %s",msgResult.getSendno(),msgResult.getMsg_id()));
			} else {
				System.out.println("发送失败, 错误代码=" + msgResult.getErrcode() + ", 错误消息=" + msgResult.getErrmsg());
			}
		} else {
			System.out.println("无法获取数据");
		}
	}

	public static final int MAX = Integer.MAX_VALUE;
	public static final int MIN = (int) MAX/2;

	/**
	 * 保持 sendNo 的唯一性是有必要的
	 * It is very important to keep sendNo unique.
	 * @return sendNo
	 */
	public static int getRandomSendNo() {
		return (int) (MIN + Math.random() * (MAX - MIN));
	}
	
}
</span>


蓝牙APP通信 安卓蓝牙APP通讯。package com.mt.truthblue2_1; import java.util.ArrayList; import java.util.List; import com.mt.mtblesdk.MTBeacon; import com.mt.tools.Tools; import com.mt.truthblue2_1.BLEService.LocalBinder; import android.annotation.SuppressLint; import android.app.Activity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.BaseAdapter; import android.widget.ListView; import android.widget.TextView; public class MainActivity extends Activity { private final static int REQUEST_ENABLE_BT = 2001; private ServiceConnection connection = new ServiceConnection() { @Override public void onServiceDisconnected(ComponentName name) { } @Override public void onServiceConnected(ComponentName name, IBinder service) { LocalBinder binder = (LocalBinder) service; Tools.mBLEService = binder.getService(); if (Tools.mBLEService.initBle()) { // scanBle(); // 开始扫描设备 if (!Tools.mBLEService.mBluetoothAdapter.isEnabled()) { final Intent enableBtIntent = new Intent( BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT); } else { scanBle(); // 开始扫描设备 } } } }; @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == REQUEST_ENABLE_BT) { if (resultCode == RESULT_OK) { scanBle(); // 开始扫描设备 } else { // finish(); } } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initView(); bindService(new Intent(this, BLEService.class), connection, Context.BIND_AUTO_CREATE); } // 初始化控件 private LayoutInflater mInflater; private ListView ble_listview; private List<MTBeacon> scan_devices = new ArrayList<MTBeacon>(); private List<MTBeacon> scan_devices_dis = new ArrayList<MTBeacon>(); private BaseAdapter list_adapter = new BaseAdapter() { @SuppressLint("InflateParams") @Override public View getView(int position, View convertView, ViewGroup parent) { if (null == convertView) { convertView = mInflater.inflate(R.layout.devicefmt, null); } TextView device_name_txt = (TextView) convertView .findViewById(R.id.device_name_txt); TextView device_rssi_txt = (TextView) convertView .findViewById(R.id.device_rssi_txt); TextView device_mac_txt = (TextView) convertView .findViewById(R.id.device_mac_txt); device_name_txt.setText(getItem(position).GetDevice().getName()); device_mac_txt.setText("Mac: " + getItem(position).GetDevice().getAddress()); device_rssi_txt.setText("Rssi: " + getItem(position).GetAveragerssi()); return convertView; } @Override public long getItemId(int position) { return position; } @Override public MTBeacon getItem(int position) { return scan_devices_dis.get(position); } @Override public int getCount() { return scan_devices_dis.size(); } }; private void initView() { mInflater = LayoutInflater.from(this); ble_listview = (ListView) findViewById(R.id.ble_listview); ble_listview.setAdapter(list_adapter); ble_listview.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // scan_flag = false; // Tools.mBLEService.stopscanBle(mLeScanCallback); Intent intent = new Intent(getApplicationContext(), ServiceActivity.class); intent.putExtra("device", scan_devices_dis.get(position) .GetDevice()); startActivity(intent); } }); } // 开始扫描 private int scan_timer_select = 0; private boolean scan_flag = true; private Handler search_timer = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); search_timer.sendEmptyMessageDelayed(0, 500); if (!scan_flag) { return; } if (!Tools.mBLEService.mBluetoothAdapter.isEnabled()) { return; } // 扫描时间调度 switch (scan_timer_select) { case 1: // 开始扫描 Tools.mBLEService.scanBle(mLeScanCallback); break; case 3: // 停止扫描(结算) Tools.mBLEService.stopscanBle(mLeScanCallback); // 停止扫描 for (int i = 0; i < scan_devices.size();) { // 防抖 if (scan_devices.get(i).CheckSearchcount() > 2) { scan_devices.remove(i); } else { i++; } } scan_devices_dis.clear(); // 显示出来 for (MTBeacon device : scan_devices) { scan_devices_dis.add(device); } list_adapter.notifyDataSetChanged(); break; default: break; } scan_timer_select = (scan_timer_select + 1) % 4; } }; private BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() { @Override public void onLeScan(BluetoothDevice device, int rssi, byte[] scanRecord) { int i = 0; // 检查是否是搜索过的设备,并且更新 for (i = 0; i < scan_devices.size(); i++) { if (0 == device.getAddress().compareTo( scan_devices.get(i).GetDevice().getAddress())) { scan_devices.get(i).ReflashInf(device, rssi, scanRecord); // 更新信息 return; } } // 增加新设备 scan_devices.add(new MTBeacon(device, rssi, scanRecord)); } }; private void scanBle() { search_timer.sendEmptyMessageDelayed(0, 500); } @Override protected void onPause() { super.onPause(); scan_flag = false; Tools.mBLEService.stopscanBle(mLeScanCallback); } @Override protected void onResume() { super.onResume(); scan_flag = true; } @Override protected void onDestroy() { super.onDestroy(); unbindService(connection); } } 立即下载

相关推荐

5分钟搞定!用L型匹配电路优化窄带天线性能(附Smith圆图实操)

本文针对窄带天线阻抗匹配难题,提供了一套5分钟快速解决方案。通过详解L型匹配电路的核心原理,并结合Smith圆图这一射频工程师的“瑞士军刀”,手把手指导如何选择拓扑、计算元件值并进行实际调试,旨在帮助硬件工程师高效优化天线性能,实现最大功率传输。

yyy34的博客 456

详解极光推送的 4 种消息形式—— Android 篇

点击打开链接 极光推送是为 App 提供第三方推送服务的平台之一,它提供四种消息形式:通知,自定义消息,富媒体和本地通知。笔者将基于官方说明与个人理解来谈一下这四种消息。本篇为 Android 篇, iOS 篇入口。 1.通知 Push Notification,即指在手机的通知栏(状态栏)上会显示的一条通知信息。Android: 依靠 JPush service ,由 JP

lyj1005353553的专栏 5978

别再只调颜色阈值了!优化K210色块追踪性能的5个关键参数与实战技巧

本文深入探讨了K210色块追踪性能优化的五大核心策略,包括图像预处理参数精细调控、find_blobs参数进阶配置、运动控制算法升级、硬件时序优化以及可视化调试系统构建。通过实战技巧和参数调整方法,帮助开发者提升K210在色块追踪项目中的识别稳定性和响应速度,适用于云台追踪等应用场景。

weixin_42531588的博客 235

极光推送在Android端的集成

这个周末,是最颓废的一个周末了。工作以来,基本每个周末都会学习点知识或者总结些东西。这个周末,身体不是很舒服,结果躺床上打了两天农药,也没有写博客。今天周一,正好我工作不忙,把上周末的博客补上。今天的博客,源于今天项目中的一个小需求:推送。这个需求不是我来做,但是我也有点兴趣,就研究了一下极光推送,并尝试着做了集成。好了,接下来总结一下极光推送在Android的集成和使用。 一....

zhaojun的博客 2万+

Vivado Schematic视图实战:从RTL分析到布局布线,如何用它快速定位设计问题(附2019.1版操作)

本文深入解析Vivado Schematic视图在FPGA设计中的关键作用,从RTL分析到布局布线全流程,帮助工程师快速定位设计问题。通过三重视图对比、高效调试四步法和高级技巧,提升问题排查效率,缩短调试时间。文章结合2019.1版操作指南和实战案例,展示如何利用Schematic视图解决典型设计问题。

weixin_30591551的博客 495

计数译码驱动显示电路实验报告_京东方G0A电路、阵列基板、显示 装置及驱动方法广州威彩...

图1、实施例二所述的选择子单元的结构示意图图2、实施例四所述的GOA电路结构示意图图3、实施例七所述的阵列基板的局部结构示意图图4、实施例所述的极性反转驱动方法的第一场的各信号时序图图5、实施例所述的极性反转驱动方法的第二场的各信号时序图图6、实施例所述的极性反转驱动方法的第三场的各信号时序图图7、实施例所述的极性反转驱动方法的第四场的各信号时序图图8、为图4所示时序下,实施例八所述显示...

weixin_35696112的博客 933

极光推送监听点击通知栏

第一步:注册广播接收者 &lt;receiver android:name="你的广播接收者" android:enabled="true" android:exported="false"&gt; &lt;intent-filter&gt; &lt;action android:name="cn.jpush.android.intent.REG.

LikeBoke的博客 3695

CANoe LIN一致性测试之干扰测试Test moudle_LIN Disturbance Block

注意:相邻两个显隐性不同的bit不允许干扰,例如我同时选择bit6和bit7,相邻两个同显隐性的bit允许干扰,例如当我选择bit3和bit4,项,这里我选择ID:为0x2F(PID:0x6F)的frame。需按照具体测试规范实施干扰项,帧头和数据段都可以实现干扰。最近发现一个干扰测试模块,下面是一些具体使用方法。选择干扰项:PID的奇偶校验位(一致性测试干扰测试之手动测试。一个待测试frameD。

yuanyikangkang的博客 3431

Android 10分钟集成极光推送

1、首先申请key https://www.jiguang.cn/accounts/login/form 2、app build.gradle添加jar依赖   compile 'cn.jiguang.sdk:jpush:3.0.7' compile 'cn.jiguang.sdk:jcore:1.1.3' compile 'me.leolin:ShortcutBadger:1.1.16...

meixi_android的博客 1031

如何正确的计算两个角度的角度差?

这一步是必要的,因为它确保了无论a相对于b是在逆时针方向还是顺时针方向,d2总是正确地反映出绕圆相反方向的角度差。这样,当函数进行最后的比较时,它能够准确地比较两个方向的旋转路径并选择最短的一个。

小秋 AI SLAM 入门实战教程 4158

【从零开始入门unity游戏开发之——C#篇01】理论开篇,理解什么是编程

理论开篇,理解什么是编程

向宇的博客,专注php/web全栈 unity游戏开发,欢迎大家评论纠错 3131

java_spring:day06

AspectJ 通知类型: 前置通知 before 后置通知 after-returning 最终通知 after 环绕通知 around 抛出异常通知 after-throwing 写一个切面类 import org.aspectj.lang.ProceedingJoinPoint; public class MyAspect03 { public void before(){ //前置通知 System.out.println("这是前置通知。。。");

m0_46540089的博客 273

YOLO系列算法改进 | 主干改进篇 | 替换LSKNet主干特征提取网络 | 通过动态调整感受野自适应融合长程上下文,显著提升小目标与复杂背景下的检测精度!

YOLO系列算法改进 | 主干改进篇 | 替换LSKNet主干特征提取网络 | 通过动态调整感受野自适应融合长程上下文,显著提升小目标与复杂背景下的检测精度! (以YOLO26最新目标检测模型为基础,利用LSKNet替代Backbone)

2502_91881744的博客 219

android 自定义推送布局_Android之极光推送发送自定义消息

Android端实现主要代码:import java.io.IOException;import java.io.InputStream;import java.net.HttpURLConnection;import java.net.MalformedURLException;import java.net.URL;import org.json.JSONException;import or...

weixin_27885313的博客 609

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

Android:有关极光推送发送自定义消息

Android端实现主要代码: import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import org.json.JSONE...

一枚善良的程序缘 1076

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

Android 中使用极光推送消息详细介绍

简介 在Android开发中,服务器有时候会向客户端推送一些用户可能感兴趣的消息,比如:淘宝,网易新闻,美团等都会向我们客户端推送消息.今天我就介绍一个第三方免费推送消息的服务:极光推送 官方资源 官方文档:  http://docs.jiguang.cn/client/android_sdk/  3 分钟快速集成 JPush Android SDK:  http://do

Zzq_Big_Cow的博客 1554

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

android126 zhihuibeijing 极光推送

https://www.jpush.cn/ 张三把消息发送给自己的服务器,自己的服务器将消息发送给极光推送,然后极光推送将消息发送给妹子。   清单文件: &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/andro...

weixin_34161064的博客 114

Android 极光推送获取自定义消息

转至:http://www.sjsjw.com/100/009151MYM003117/ 参考官方Android SDK 教程完成激光推送的基本配置区别通知和自定义消息  通知即指在手机的通知栏(状态栏)上会显示的一条通知信息。  自定义消息是极光推送自己的概念。  自定义消息不是通知,所以不会被SDK展示到通知栏上。其内容完全由开发者自己定义。  自定义

h183288132的专栏 1万+

uniapp 极光推送插件接入成功示例 点击通知栏消息可以传指定参数并跳到应用指定页面

uniapp 极光推送插件接入成功示例 点击通知栏消息可以传指定参数并跳到应用指定页面

DarlingYL的博客 1939

极光推送消息

public static PushPayload bulidAndroidCustomMsg(String content,String... userids) {        return PushPayload.newBuilder()                .setPlatform(Platform.android())                .setAudience(A...

shen_璀璨滑稽的博客 319

android极光推送 消息穿透广告弹窗,Android使用第三方推送(一)极光推送通知

现在Android有不少的第三方推送接口,大大节省了我们的时间,让我们专注于软件本身的编写。极光推送作为一个比较成熟的推送API,用起来是非常便利的,今天就来总结一下。注册账号之后,首先创建一个应用,如下图:应用创建完成之后,会生成应用标识(AppKey)和API Master Secret,如下图:然后下载Android Example:解压之后就是一个Android Project,导入Ecl...

weixin_39651735的博客 623

JAVA极光推送详细工具类

一.引入依赖 <jpush-client.version>3.4.6</jpush-client.version> <!-- 极光 --> <dependency> <groupId>cn.jpush.api</groupId> <artifactId>jpush-client&lt...

刘骐毓的博客 974
上一篇: Android SearchView结合Filter实现列表检索功能使用总结
下一篇: 详解ListView加载网络图片的优化
longduyuan
博客等级 码龄12年 3粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值