Commit 4fb59900 authored by Libin Lu's avatar Libin Lu

change back package name

parent edc66ada
......@@ -27,7 +27,7 @@ apply plugin: 'com.google.gms.google-services' // <- Add this line
...
```
- In `android/app/src/main/AndroidManifest.xml`, add these lines, be sure to change `com.xxx.yyy` to your package
- In `android/app/src/main/AndroidManifest.xml`
```
<application
......@@ -54,7 +54,7 @@ install pod 'Firebase/Messaging'
in AppDelegate.m add
```
#import "FCMModule.h"
#import "RNFIRMessaging.h"
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
......@@ -117,6 +117,6 @@ this.fcmTokenLsnr.remove();
Try update your SDK and google play service
### I can't get data notification when app is killed?
If you send notification with payload only, you can only get the data message when app is in foreground or background. Killed app can't show notification
### Why I don't get data notification when I'm sending hybrid notification when app is in background?
### I can't get data notification when app is in background with hybrid notification
I want to figure it out too. Looks like that is how GCM/FCM works. I'm sending 2 notification separately for now. Let me know if you find a better solution
......@@ -65,14 +65,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
......@@ -81,7 +73,16 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
......@@ -93,6 +94,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
......@@ -106,8 +108,8 @@
<orderEntry type="library" exported="" name="support-v4-23.0.1" level="project" />
<orderEntry type="library" exported="" name="stetho-1.2.0" level="project" />
<orderEntry type="library" exported="" name="jackson-core-2.2.3" level="project" />
<orderEntry type="library" exported="" name="okio-1.6.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-ws-2.5.0" level="project" />
<orderEntry type="library" exported="" name="okio-1.6.0" level="project" />
<orderEntry type="library" exported="" name="fbcore-0.8.1" level="project" />
<orderEntry type="library" exported="" name="firebase-messaging-9.0.1" level="project" />
<orderEntry type="library" exported="" name="stetho-okhttp-1.2.0" level="project" />
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.evollu.react.firebase">
package="com.evollu.react.fcm">
</manifest>
package com.evollu.react.firebase;
package com.evollu.react.fcm;
import android.content.BroadcastReceiver;
import android.content.Intent;
......@@ -56,7 +56,7 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li
}
private void registerTokenRefreshHandler() {
IntentFilter intentFilter = new IntentFilter("com.evollu.react.firebase.FCMRefreshToken");
IntentFilter intentFilter = new IntentFilter("com.evollu.react.fcm.FCMRefreshToken");
getReactApplicationContext().registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
......@@ -74,7 +74,7 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li
}
private void registerNotificationHandler() {
IntentFilter intentFilter = new IntentFilter("com.evollu.react.firebase.ReceiveNotification");
IntentFilter intentFilter = new IntentFilter("com.evollu.react.fcm.ReceiveNotification");
getReactApplicationContext().registerReceiver(new BroadcastReceiver() {
@Override
......
package com.evollu.react.firebase;
package com.evollu.react.fcm;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.JavaScriptModule;
......
package com.evollu.react.firebase;
package com.evollu.react.fcm;
import android.content.Intent;
import android.os.Bundle;
......@@ -25,7 +25,7 @@ public class InstanceIdService extends FirebaseInstanceIdService {
// Broadcast refreshed token
Intent i = new Intent("com.evollu.react.firebase.FCMRefreshToken");
Intent i = new Intent("com.evollu.react.fcm.FCMRefreshToken");
Bundle bundle = new Bundle();
bundle.putString("token", refreshedToken);
i.putExtras(bundle);
......
package com.evollu.react.firebase;
package com.evollu.react.fcm;
import android.content.Intent;
import android.util.Log;
......@@ -14,7 +14,7 @@ public class MessagingService extends FirebaseMessagingService {
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Log.d(TAG, "Remote message received");
Intent i = new Intent("com.evollu.react.firebase.ReceiveNotification");
Intent i = new Intent("com.evollu.react.fcm.ReceiveNotification");
i.putExtra("data", remoteMessage);
sendOrderedBroadcast(i, null);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment