REFERENCE

1. 개요

Morpheus Push 를 사용하기 위해, 참고해야 할 내용에 대해 설명한다.

2. 푸시 발송 정책

서버 / 클라이언트에 설정된 푸시 정책에 따라, 등록, 발송, 수신에 대한 workflow를 아래와 같이 설명한다.

FCM은 GCM과 동일한 절차를 따른다.

Note

서버 / 클라이언트의 푸시 정책은 동일하게 선언되어야 한다.

download [푸시 발송 정책]


가. One User One Device 정책 : CASE 1

PUSH 발송 시, 발송코드를 UPNS+ APNS로 취한 경우, 클라이언트가 수신하는 데이터에 대해 설명

../_images/policy1.JPG

나. One User One Device 정책 : CASE 2

PUSH 발송 시, 발송코드를 FCM + UPNS + APNS로 취한 경우, 클라이언트가 수신하는 데이터에 대해 설명

../_images/policy2.JPG

다. One User Multi Device 정책 : CASE 1

PUSH 발송 시, 발송코드를 FCM + UPNS + APNS로 취한 경우, 클라이언트가 수신하는 데이터에 대해 설명

../_images/policy3.JPG

라. One User Multi Device 정책 : CASE 2

PUSH 발송 시, 발송코드를 UPNS + APNS로 취한 경우, 클라이언트가 수신하는 데이터에 대해 설명

../_images/policy4.JPG

3. Android Proguard 적용

가. app module 의 gradle 파일 (build.gradle)

buildTypes {
        release {
                minifyEnabled true
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'mpush_proguard.txt'
        }
}

나. 프로젝트 > mpush_proguard.txt 생성

# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

#상기 선언된 내용에 대한 진행 중 발생하는 문제에 대해 경고하지 않는다.
-dontwarn android.support.v4.**
-dontwarn com.google.**
-dontwarn org.apache.**
-dontwarn m.client.push.library.**
-dontwarn mpush.eclipse.paho.**
-downwarn mpush.eclipse.paho.client.mqttv3.internal.ssl.SecureSocketSslContextFactory
-downwarn mpush.eclipse.paho.client.mqttv3.internal.ssl.SecureSocketSslContextFactory

#Keep classes that are referenced on the AndroidManifest
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class * extends android.support.v4.app.Fragment

mpush_proguard.txt 다운로드.