Skip to content

Commit

Permalink
修改快速接入文档
Browse files Browse the repository at this point in the history
  • Loading branch information
comsince committed Jan 5, 2017
1 parent 66901ac commit 892a360
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 29 deletions.
6 changes: 3 additions & 3 deletions PushdemoInternal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.meizu.pushdemo"
minSdkVersion 16
targetSdkVersion 23
versionCode 126
versionName "1.3.161226"
versionCode 128
versionName "1.3.170103"
}
buildTypes {
release {
Expand All @@ -22,7 +22,7 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile(name:'push-internal-3.3.161226', ext:'aar')
compile(name:'push-internal-3.3.170103', ext:'aar')
//compile 'com.meizu.flyme.internet:push-internal-publish:3.2.161219'
//compile project(':push-internal-publish')
compile 'com.android.support:appcompat-v7:22.2.0'
Expand Down
Binary file removed PushdemoInternal/libs/push-internal-3.3.161226.aar
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import android.graphics.BitmapFactory;
import android.os.IBinder;

import com.meizu.cloud.pushsdk.pushtracer.utils.Logger;
import com.meizu.cloud.pushinternal.DebugLogger;


/**
Expand All @@ -29,7 +29,7 @@ public void onCreate() {

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Logger.i("LocalService", "Received start id " + startId + ": " + intent);
DebugLogger.i("LocalService", "Received start id " + startId + ": " + intent);
// In this sample, we'll use the same text for the ticker and the expanded notification
if(START_FOREGROUD_SERVICE.equals(intent.getAction())){
CharSequence text = getText(R.string.local_service_started);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.meizu.cloud.pushsdk.platform.message.SubAliasStatus;
import com.meizu.cloud.pushsdk.platform.message.SubTagsStatus;
import com.meizu.cloud.pushsdk.platform.message.UnRegisterStatus;
import com.meizu.cloud.pushsdk.util.UxIPUtils;
import com.meizu.cloud.pushsdk.util.MzSystemUtils;
import com.meizu.pushdemo.events.SendNotificationMessage;
import com.meizu.pushdemo.events.ThroughMessageEvent;

Expand Down Expand Up @@ -188,7 +188,7 @@ public void onClick(View view) {
break;
case R.id.btn_check_push_switch:
PushManager.checkPush(this, APP_ID, APP_KEY, PushManager.getPushId(this));
UxIPUtils.onLogEvent(this, "com.meizu.pushdemo", "867247020006101","123","154515","notification_service_message",String.valueOf(System.currentTimeMillis()/1000));
//UxIPUtils.onLogEvent(this, "com.meizu.pushdemo", "867247020006101","123","154515","notification_service_message",String.valueOf(System.currentTimeMillis()/1000));
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.meizu.cloud.pushsdk.platform.message.SubAliasStatus;
import com.meizu.cloud.pushsdk.platform.message.SubTagsStatus;
import com.meizu.cloud.pushsdk.platform.message.UnRegisterStatus;
import com.meizu.cloud.pushsdk.util.MzSystemUtils;
import com.meizu.pushdemo.events.ThroughMessageEvent;

import org.greenrobot.eventbus.EventBus;
Expand Down
39 changes: 18 additions & 21 deletions QuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* [1.2.2 注册消息接收Receiver](#pushmessage_receiver_manifest_setting)
* [1.2.3 实现自有的PushReceiver,实现消息接收,注册与反注册回调](#pushmessage_receiver_code_setting)
* [二.调用新版注册](#start_register)
* [三. 通知栏图标设置](#notification_small_icon_setting)
* [反馈与建议](README.md)
* [问题汇总说明](README.md)

Expand All @@ -30,26 +31,7 @@ PushSDK3.0以后的版本使用了最新的魅族插件发布aar包,因此大
```



**NOTE:** 以下内容说明混淆规则

* 混淆
Meizu插件以前是将proguard文件独立发布,因此proguard文件需要独立配置,现在我们已经将proguard打包进了aar中,具体详见[consumerProguardFiles](http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.BuildType.html#com.android.build.gradle.internal.dsl.BuildType:consumerProguardFiles),因此就不再需要单独配置proguard远程依赖了

**NOTE:** 快速接入可能遇到的问题
pushSDK由于会引用或者被其他公共项目引用,这样会导致很多包冲突的问题,可以通过以下办法快速解决包传递依赖关系;例如现在应用升级引用的是旧版本的pushSDK,需要解除其依赖关系,可以参照下面配置实现
```
compile(group: 'com.meizu.flyme.sdk', name: 'updatecomponent', version: '1.0.160602', ext: 'aar'){
transitive = false
}
```

* [分析项目依赖关系](https://dongchuan.gitbooks.io/gradle-user-guide-/content/using_the_gradle_command-line/getting_the_insight_into_a_particular_dependency.html)
```
./gradlew -q dependencies ${module}:dependencies --configuration ${dependece configuration}
```
通过该命令分析你的项目依赖关系,找出冲突的aar



## 1.2 必要的配置<a name="nessary_setting"/>

Expand Down Expand Up @@ -146,7 +128,7 @@ PushSDK3.0以后的版本使用了最新的魅族插件发布aar包,因此大
```


# 二. 调用新版注册
# 二. 调用新版注册<a name="start_register"/>
**Note:** 至此pushSDK 已经集成完毕,现在你需要在你的Application中调用新版的[register](#register)方法,
```
/**
Expand All @@ -163,6 +145,21 @@ PushSDK3.0以后的版本使用了最新的魅族插件发布aar包,因此大
你现在可以到[新版Push平台](http://push.meizu.com) 找到你的应用推送消息就可以了;以下内容是pushSDK提供的api汇总,具体功能详见api具体说明,请根据需求选用合适的功能
[详细功能说明参见](README.md)

# 三. 通知栏图标设置<a name="notification_small_icon_setting"/>


```
/**
* 获取smallicon
* */
public void onUpdateNotificationBuilder(PushNotificationBuilder pushNotificationBuilder){
//设置通知栏弹出的小图标
pushNotificationBuilder.setmStatusbarIcon(R.drawable.mz_push_notification_small_icon);
};
```

**Note:** Flyme6新的通知栏中心需要按照名称来获取状态栏Icon,你需要在相应的drawable不同分辨率文件夹下放置一个名称为```mz_push_notification_small_icon```的状态栏图标文件,请确保名称正确,否则将无法正确显示你应用的状态栏图标




4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
##[2016-12-23] V3.3.161222
* 1 pushsdk 去除第三方依赖,不再依赖其他任何第三方库
* 2 jecter暂停使用,请下载[PushSDK aar](https://github.com/MEIZUPUSH/PushDemo/releases)本地引用,具体可以参考pushdemo的libs目录

# [```快速接入魅族Push点击这里```](QuickStart.md)

# PushSDK接入说明目录<a name="index"/>
# PushSDK接入详细说明目录<a name="index"/>
* [一.应用背景](#app_backgroud)
* [二.设计思想](#design_thought)
* [三.魅族云推送集成说明](#integrete_setting_description)
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.


buildscript {
repositories {
flatDir {
Expand All @@ -22,6 +23,7 @@ allprojects {
}
}


/*buildscript {
repositories {
maven {
Expand Down

0 comments on commit 892a360

Please sign in to comment.