All Projects → commonprogress → PushAll

commonprogress / PushAll

Licence: other
PushAll让推送集成更简洁、快速

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to PushAll

ejabberd mod gcm
Google Cloud Messaging API for Ejabberd (PUSH Messages)
Stars: ✭ 27 (-3.57%)
Mutual labels:  push
aiosfstream
Salesforce Streaming API client for asyncio
Stars: ✭ 46 (+64.29%)
Mutual labels:  push
text-sdk-php
PHP SDK to send messages with CM.com
Stars: ✭ 18 (-35.71%)
Mutual labels:  push
browser-push
Complete workout and guidelines to add web push notifications support for your webapp without third-party notification provider
Stars: ✭ 67 (+139.29%)
Mutual labels:  push
epns
📱 Erlang Push Notifications. APNS(Apple Push Notifications) and FCM(Firebase Cloud Messaging) Push Notifications
Stars: ✭ 13 (-53.57%)
Mutual labels:  push
hms-cordova-plugin
This repo contains all of Cordova HMS plugins.
Stars: ✭ 78 (+178.57%)
Mutual labels:  push
umeng analytics push
Umeng Analytics&Push Flutter Plugins
Stars: ✭ 28 (+0%)
Mutual labels:  push
jpush
极光推送go客户端,支持定时推送,推送,设备标签别名更改等
Stars: ✭ 24 (-14.29%)
Mutual labels:  jpush
pushd
An open source distributed pubsub/IM server
Stars: ✭ 30 (+7.14%)
Mutual labels:  push
PushAPI
魅族开放平台PUSH系统HTTP API接口规范以及说明文档
Stars: ✭ 28 (+0%)
Mutual labels:  push
homebridge-http-rgb-push
Homebridge plugin to control a web/http-based RGB device.
Stars: ✭ 16 (-42.86%)
Mutual labels:  push
react-push-menu
react multi level push menu
Stars: ✭ 37 (+32.14%)
Mutual labels:  push
cabl
Controller ABstraction Layer
Stars: ✭ 111 (+296.43%)
Mutual labels:  push
ngx-stream-request-module
基于ngx-stream-module 实现长连接的处理,把长连接数据按照使用的协议转切分为请求(request),与后端服务器使用短连接通讯,完全兼容后端http协议。后端服务器使用推送协议可以很方便的把数据推送到客户端。
Stars: ✭ 15 (-46.43%)
Mutual labels:  push
getui-pushapi-java-demo
个推官方提供的推送服务端API Demo(Java语言)
Stars: ✭ 32 (+14.29%)
Mutual labels:  push
applink
A simple router based on scheme for Android
Stars: ✭ 21 (-25%)
Mutual labels:  push
firetower
firetower 基于golang构建的websocket开发框架 | 推送 | IM | 游戏
Stars: ✭ 40 (+42.86%)
Mutual labels:  push
action-mercure
🚀 GitHub Action for Mercure.
Stars: ✭ 14 (-50%)
Mutual labels:  push
mobile-messaging-sdk-ios
Mobile Messaging SDK for iOS
Stars: ✭ 45 (+60.71%)
Mutual labels:  push
feedpushr
A simple feed aggregator daemon with sugar on top.
Stars: ✭ 222 (+692.86%)
Mutual labels:  push

Pushdemo 让你的推送集成更简洁,快速。

本项目集成了小米 oppo vivo 华为 魅族五大厂商,以及极光推送。

************************************************ 集成 ********************************************************

集成方式:

Gradle 项目根目录build.gradle

    apply from: "push_config.gradle"
    
    buildscript {
    
        repositories {
            ...
            maven {url 'https://developer.huawei.com/repo/'}
        }
        dependencies {
            ...
            classpath 'com.huawei.agconnect:agcp:1.3.1.300'
        }
    }
    
 	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
			maven { url 'https://developer.huawei.com/repo/' }
		}
	}

引用Push aar

	dependencies {
            implementation 'androidx.appcompat:appcompat:1.1.0'
            implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
            implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
	        implementation 'com.github.commonprogress:PushAll:v1.4.0'
	}

Maven

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

	<dependency>
	    <groupId>com.github.commonprogress</groupId>
	    <artifactId>PushAll</artifactId>
	    <version>Tag</version>
	</dependency>

push_config.gradle 配置各大推送平台key

/*配置账号相关*/
        ext {
            main_packagename = "com.dongxl.push" //程序主包名,选填
            pushreceive_mode = "1" //选填,只有值为 1 时 继承PushMessageService 否则 继承PushReceiveService
            pushreceiveservice = "com.dongxl.push.service.PushReceiveService" //自己实现的推送接收action
            
        //极光
            jpush_appkey = "46b514bd1b982739ec4d2f6f" //极光key 
            jpush_channel = "default_developer" //极光渠道 默认default_developer
        
        //华为
            huaweipush_appid = "101075517"
        
        //vivo
            vivopush_appkey = "6ab44aea-3c2a-4dd9-94c7-e0e5d0cb4d26"
            vivopush_appid = "14449"
        
        //小米
            xiaomipush_appid = "2882303761517172047"
            xiaomipush_appkey = "5331717244047"
        
        //oppo
            oppopush_appid = "bt2M9eaEu4jZZoYqqYVT6e3X"
            oppopush_appkey = "bt2M9eaEu4jZZoYqqYVT6e3X"
            oppopush_appsecret = "bt2M9eaEu4jZZoYqqYVT6e3X"
        
        //魅族
            meizupush_appkey = "ae5adce01f6c4fbe9b39d9f7ae3fc1de"
            meizupush_appid = "123037"
        }

初始化操作:主module添加华为的平台导出的 agconnect-services.json

PushRegisterSet 推送注册操作类
1,项目的Application onCreate方法添加PushRegisterSet.applicationInit(this);初始化
2,项目的启动类onCreate方法添加 PushRegisterSet.registerInitPush(this)注册获取token

AndroidManifest.xml 添加:二选一
  <!-- 自定义的PushReceiveJobService 是继承PushMessageService -->
方法一
 <service android:name=".service.PushReceiveJobService"
            android:enabled="true"
            android:exported="true"
            android:permission="android.permission.BIND_JOB_SERVICE" />

<!-- 自定义的PushReceiveJobService 是继承PushMessageService -->
 <service
            android:name=".service.PushReceiveService"
            android:enabled="true"
            android:exported="true"></service>


方法二
 注册静态广播 集成 PushMessageReceiver

实现以下方法 回调 token 通知消息 透传消息 
 /**
     * 获取新的token new token
     *
     * @param platform
     * @param regId
     */
    protected abstract void onPushNewToken(String regId, String platform);

    /**
     * 接收到通知消息 暂时不支持
     *
     * @param throughMessage
     * @param platform
     */
    protected abstract void onReceiveNotifiMessage(MessageDataBean throughMessage, String platform);

    /**
     * 接收到透传消息的 小米 华为 支持
     *
     * @param throughMessage
     * @param platform
     */
    protected abstract void onReceiveThroughMessage(MessageDataBean throughMessage, String platform);

各大推送平台服务端简单demo

https://github.com/lingduzuobiao123/PushSenderSample


v1.3.0

  1. 华为推送服务3.0 https://developer.huawei.com/consumer/cn/service/hms/catalog/huaweipush_v3.html?page=hmssdk_huaweipush_devprepare_v3 1,在华为开发平台生成的agconnect-services.json文件拷贝到应用级根目录下。

v1.2.1

  1. 此项目引用Gradle的配置

v1.1.0

  1. 账号配置外迁,让你的配置更简单

v1.0.0

  1. 集成各大厂家推送

混淆注意事项:

-dontoptimize
-dontpreverify
-ignorewarnings
-keepattributes *Annotation*
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes SourceFile,LineNumberTable

#=================  push  =================
-dontwarn com.dongxl.pushdeme.**
-keep class com.dongxl.pushdeme.** { *; }

#====极光====
-dontwarn cn.jpush.**
-keep class cn.jpush.** { *; }
-keep class * extends cn.jpush.android.helpers.JPushMessageReceiver { *; }
-dontwarn cn.jiguang.**
-keep class cn.jiguang.** { *; }

#=================  小米push  =================
-keepclasseswithmembernames class com.xiaomi.**{*;}
-keep public class * extends com.xiaomi.mipush.sdk.PushMessageReceiver
-dontwarn com.xiaomi.push.service.a.a

#=================  华为push  =================
-keep class com.hianalytics.android.**{*;}
-keep class com.huawei.updatesdk.**{*;}
-keep class com.huawei.hms.**{*;}
-keep class com.huawei.android.hms.agent.**{*;}

#=================  vivo push  =================
-dontwarn com.vivo.push.**
-keep class com.vivo.push.**{*; }
-keep class com.vivo.vms.**{*; }
-keep class com.jsy.push.vivo.VivoPushReceiver{*;}

#=================  oppo push  =================
-keep public class * extends android.app.Service

#=================  meizu push  =================
-dontwarn com.meizu.cloud.pushsdk.**
-keep class com.meizu.cloud.pushsdk.**{*;}


此项目持续维护中,如有问题 请加QQ:254547297 效果图1

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].