Repro - Mobile Analytics for growth
日本語
Sign Up Back to Dashboard
  • System Requirements
  • Dashboard Guide
  • Development Guide
  • Release Notes
    • SDK
    • Web
    • Domain change related tasks
    • FCM transition procedure
      • Android
      • Unity
      • Cordova
      • Monaca
        • Transition procedure
          • Transition of a Google Cloud Platform project to the Firebase Console
          • Setup FCM
          • Updating of the Repro Cordova Plugin
          • Adjust your config.xml
          • Registration ID acquisition method related changes
      • Cocos2d-x
  • FAQ

Upgrade Guide to FCM: Monaca¶

As announced by google, the support for GCM will end at 2019/4/11. Therefore in case you are still using GCM, it is recommended to follow the FCM transition procedure described below soon.

Transition procedure¶

Transition of a Google Cloud Platform project to the Firebase Console¶

From your Firebase Console create a new project and select your former GCM project:

../../_images/1-1-ImportGCMProject.en.png
  • Please confirm that your Google Cloud Platform project number and your Cloud Messaging sender ID are Identical. You can find your Project number under Google Cloud Platform > IAM & admin > Settings

    ../../_images/1-2-GCMProjectID.en.png
  • The sender ID can be found in your Firebase Console under Settings(icon) > Cloud Messaging:

    ../../_images/1-3-FCMSenderID.en.png

Setup FCM¶

  1. Refer the steps in Register the App to download the google-services.json .

  2. Refer the steps in Generate Private Key and Register Server Key on Repro to register your Server Key.

  3. Refer the steps in Add google-services.json to add google-services.json to your project.

Updating of the Repro Cordova Plugin¶

In the Monaca IDE click Configure > Cordova Plugin Settings

../../_images/3-1-cordova-plugin.en.png

Place the cursor over Repro and click settings.

../../_images/3-2-choose-repro.en.png

Select a plugin version above 4.1.1 and click OK.

Adjust your config.xml¶

Change io.repro.android.GCMReceiver to io.repro.ReproReceiver like this:

 <receiver
-    android:name="io.repro.android.GCMReceiver"
+    android:name="io.repro.android.ReproReceiver"
     android:exported="true"
     android:permission="com.google.android.c2dm.permission.SEND">
     <intent-filter>
         <action android:name="com.google.android.c2dm.intent.RECEIVE" />
         <category android:name="YOUR_PACKAGE_NAME" />
     </intent-filter>
 </receiver>

Registration ID acquisition method related changes¶

The argument passed to``Repro.enablePushNotification`` as well as Repro.enablePushNotificationForAndroid must be removed.

 function onDeviceReady() {
     ...
-    Repro.enablePushNotification(SENDER_ID);
-    Repro.enablePushNotificationForAndroid(SENDER_ID);
+    Repro.enablePushNotificationForAndroid();
  • « Upgrade Guide to FCM: Cordova
  • Upgrade Guide to FCM: Cocos2d-x »

About Us Careers Terms of Service Privacy Policy Cookie Policy

© 2022 Repro Inc.