Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: evollu/react-native-fcm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v15.0.2
Choose a base ref
...
head repository: evollu/react-native-fcm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
13 changes: 9 additions & 4 deletions Examples/simple-fcm-client/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: "com.android.application"
apply plugin: "com.google.gms.google-services"

import com.android.build.OutputFile

@@ -84,13 +83,13 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion 27
buildToolsVersion "27.0.3"

defaultConfig {
applicationId "com.google.firebase.quickstart.fcm"
minSdkVersion 16
targetSdkVersion 22
targetSdkVersion 27
versionCode 1
versionName "1.0"
ndk {
@@ -124,6 +123,10 @@ android {
}
}
}
configurations.all {
resolutionStrategy.force 'com.android.support:support-core-utils:26.1.0'
resolutionStrategy.force 'com.android.support:support-core-ui:26.1.0'
}
}

dependencies {
@@ -145,3 +148,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}

apply plugin: "com.google.gms.google-services"
12 changes: 10 additions & 2 deletions Examples/simple-fcm-client/android/build.gradle
Original file line number Diff line number Diff line change
@@ -3,10 +3,14 @@
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -21,5 +25,9 @@ allprojects {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jan 06 16:34:59 EST 2017
#Thu May 03 13:49:29 EDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
8 changes: 8 additions & 0 deletions Examples/simple-fcm-client/app/App.js
Original file line number Diff line number Diff line change
@@ -35,6 +35,13 @@ class MainPage extends Component {
}

async componentDidMount() {
//FCM.createNotificationChannel is mandatory for Android targeting >=8. Otherwise you won't see any notification
FCM.createNotificationChannel({
id: 'default',
name: 'Default',
description: 'used for example',
priority: 'high'
})
registerAppListener(this.props.navigation);
FCM.getInitialNotification().then(notif => {
this.setState({
@@ -75,6 +82,7 @@ class MainPage extends Component {

showLocalNotification() {
FCM.presentLocalNotification({
channel: 'default',
id: new Date().valueOf().toString(), // (optional for instant notification)
title: "Test Notification with action", // as FCM payload
body: "Force touch to reply", // as FCM payload (required)
2 changes: 1 addition & 1 deletion Examples/simple-fcm-client/package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "^0.55.4",
"react-native-fcm": "^15.0.1",
"react-native-fcm": "^16.2.3",
"react-native-maps": "^0.20.1",
"react-navigation": "^1.2.1"
},
6 changes: 3 additions & 3 deletions Examples/simple-fcm-client/yarn.lock
Original file line number Diff line number Diff line change
@@ -4209,9 +4209,9 @@ react-native-drawer-layout@1.3.2:
dependencies:
react-native-dismiss-keyboard "1.0.0"

react-native-fcm@^15.0.1:
version "15.0.1"
resolved "https://registry.yarnpkg.com/react-native-fcm/-/react-native-fcm-15.0.1.tgz#9083403eb0efc45cfc8e7230d849cd4db7174e10"
react-native-fcm@^16.2.3:
version "16.2.3"
resolved "https://registry.yarnpkg.com/react-native-fcm/-/react-native-fcm-16.2.3.tgz#f55822b8987007221c691f8603b868e67a99ff10"

react-native-maps@^0.20.1:
version "0.20.1"
Loading