Upgrade to Pro — share decks privately, control downloads, hide ads and more …

俺が考える最強のPush Receiver

俺が考える最強のPush Receiver

FCMとReproを共存させるためにちょっと考えてみた

hayashi hirotake

August 28, 2018
Tweet

More Decks by hayashi hirotake

Other Decks in Technology

Transcript

  1. REPRO TECH MEETUP #2 Navigate : Space / Arrow Keys

    | - Menu | - Fullscreen | - Overview | - Blackout | - Speaker | - Help M F O B S ?  1 / 37
  2. INTRO  @hiroxyy_ hiroxyy Repro CRE Team Leader 3名 Technical

    Support Main: Android(半年ちょい) [ GitPitch @ github/hiroxyy/slides ]  2 / 37
  3. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

    Repro Amazon Simple Notification Service mobile backend Appvisor push CORE PUSH Growth Push Kii Cloud Urban Airship PushWoosh MAJIN [ GitPitch @ github/hiroxyy/slides ]  11 / 37
  4. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

    OneSignal pushnate push7 LOGBASE batch Braze kumulos SWRVE Upsight Accengage [ GitPitch @ github/hiroxyy/slides ]  12 / 37
  5. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

    Catapush Mapp Leanplum OneSignal Intercom Pusher Carnival.io PushBots Localytics Kahuna [ GitPitch @ github/hiroxyy/slides ]  13 / 37
  6. AndroidManifest.xml 01 // Firebase Push Service 02 <service 03 android:name=".MyFirebaseMessagingService">

    04 <intent-filter> 05 <action android:name="com.google.firebase.MESS 06 </intent-filter> 07 </service> 08 09 // Repro Push Receiver 10 <receiver 11 android:name="com.hiroxy.multipushapp.MyGCMReceive [ GitPitch @ github/hiroxyy/slides ]  21 / 37
  7. FCM Repro Notification Message FG:◯ BG:✕ FG:◯ BG:◦ Data Message

    FG:◯ BG:◦ FG:◯ BG:◦ FCM Serviceと Repro Receiverの比較 [ GitPitch @ github/hiroxyy/slides ]  22 / 37
  8. MyGCMReceiver.java 01 package com.hiroxy.multipushapp; 02 03 … 04 05 public

    class MyGCMReceiver extends BroadcastReceiver { 06 07 private static final String TAG = "GCMReceiver"; 08 09 @Override 10 public void onReceive(Context context, Intent inte 11 中身を確認 [ GitPitch @ github/hiroxyy/slides ]  27 / 37
  9. INTENT比較 FCMからのPush(notification message)のintent 01 google.c.a.udt:0 02 google.sent_time:1535343208004 03 google.ttl:2419200 04

    gcm.notification.e:1 05 google.c.a.c_id:5316713855114895493 06 google.c.a.ts:1535343208 07 gcm.notification.title:From FCM //titleっぽい 08 gcm.n.e:1 09 from:918839616658 10 google.message_id:0:1535343208043592%c3f2cc90c3f2cc90 11 gcm.notification.body:fcm notification message from hi [ GitPitch @ github/hiroxyy/slides ]  28 / 37
  10. ReproからのPush(data message)のintent 01 google.sent_time:1535339920264 02 google.ttl:2419200 03 body:data message from

    hiroxyy // 定義したkey 04 from:918839616658 05 repro:n3ylk7yd // repro独自のkey 06 title:From Repro // 定義したkey 07 google.message_id:0:1535339920272127%c3f2cc90f9fd7ecd 08 google.priority:normal [ GitPitch @ github/hiroxyy/slides ]  29 / 37
  11. MyGCMReceiver.java 01 package com.hiroxy.multipushapp; 02 03 … 04 05 public

    class MyGCMReceiver extends BroadcastReceiver { 06 07 private static final String TAG = "GCMReceiver"; 08 09 @Override 10 public void onReceive(Context context, Intent inte 11 中身を確認 [ GitPitch @ github/hiroxyy/slides ]  30 / 37