Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch push notification lib #346

Merged
merged 38 commits into from
Jul 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b9b5733
Changed the way we read RocketChat settings since setting.type won't …
diegolmello Jun 13, 2018
a39c859
Permissions
diegolmello Jun 13, 2018
e5903ae
Unnecessary action sheet render
diegolmello Jun 13, 2018
c5f84e1
Update gradle
diegolmello Jun 14, 2018
8e9ea5c
Switched testServer to use blob
diegolmello Jun 14, 2018
ea952b7
Merge branch 'settings-fix' into update-sdk-version
diegolmello Jun 15, 2018
955a614
RoomsListHeader search fixed
diegolmello Jun 15, 2018
4c8fb16
Runs loadMessagesForRoom only if room has at least 20 rows
diegolmello Jun 15, 2018
c8aab3d
- Logout if user's token expired
diegolmello Jun 18, 2018
32c4193
- Animations disabled
diegolmello Jun 18, 2018
43bc745
Merge branch 'develop' into update-sdk-version
diegolmello Jun 18, 2018
0fab2ae
Tests updated
diegolmello Jun 18, 2018
7c6e419
react-native-navigation installed
diegolmello Jun 19, 2018
bcdf90e
Routes working
diegolmello Jun 21, 2018
c9813da
Tests passing
diegolmello Jun 22, 2018
ce63882
fix: package.json & .snyk to reduce vulnerabilities
snyk-bot Jun 22, 2018
db890f5
Setting android
diegolmello Jun 22, 2018
acf68db
Polyfill
diegolmello Jun 22, 2018
6c2d894
Switched to react-native-navigation v1
diegolmello Jun 25, 2018
883f421
Deep linking
diegolmello Jun 26, 2018
cee47dc
Push notifications
diegolmello Jun 26, 2018
1ead97a
Merge branch 'develop' into navigation
diegolmello Jun 26, 2018
e358f82
Room search android
diegolmello Jun 27, 2018
ee00603
Splash
diegolmello Jun 27, 2018
9704165
Start app refatored
diegolmello Jun 28, 2018
9224cab
Detox
diegolmello Jun 28, 2018
d1497da
OAuth now uses react-native-navigator modal
diegolmello Jun 28, 2018
30a349d
react-native-splash-screen removed
diegolmello Jun 28, 2018
7106ab4
react-navigation removed
diegolmello Jun 28, 2018
ac79004
Redux performance
diegolmello Jun 28, 2018
1259650
Switched back to @connect decorator
diegolmello Jun 29, 2018
d0a9d01
react-native-notifications configured
diegolmello Jun 29, 2018
b45cf11
fix: .snyk & package.json to reduce vulnerabilities
snyk-bot Jul 2, 2018
d68c69a
Push working
diegolmello Jul 3, 2018
e6220a5
Dependencies updated
diegolmello Jul 4, 2018
d1c5df8
Merge branch 'snyk-fix-eqf4g6' into push-notification
diegolmello Jul 4, 2018
83b1272
Merge branch 'snyk-fix-ab1cd90e' into push-notification
diegolmello Jul 4, 2018
54085b7
Duplicate google repo buildscript removed
diegolmello Jul 9, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ module.exports = {
"prefer-const": 2,
"object-shorthand": 2,
"consistent-return": 0,
"global-require": "off",
"react/prop-types": [0, { skipUndeclared: true }]
"global-require": "off"
},
"globals": {
"__DEV__": true
Expand Down
22 changes: 21 additions & 1 deletion .snyk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.7.1
version: v1.12.0
ignore: {}
# patches apply the minimum changes required to fix a vulnerability
patch:
Expand All @@ -24,3 +24,23 @@ patch:
patched: '2017-09-29T23:29:20.238Z'
- realm > extract-zip > debug:
patched: '2017-09-29T23:29:20.238Z'
'npm:lodash:20180130':
- react-native > plist > xmlbuilder > lodash:
patched: '2018-07-02T23:20:39.933Z'
'npm:hoek:20180212':
- realm > node-pre-gyp > hawk > hoek:
patched: '2018-06-22T03:39:40.096Z'
- realm > node-pre-gyp > hawk > boom > hoek:
patched: '2018-06-22T03:39:40.096Z'
- realm > node-pre-gyp > hawk > sntp > hoek:
patched: '2018-06-22T03:39:40.096Z'
- realm > node-pre-gyp > hawk > cryptiles > boom > hoek:
patched: '2018-06-22T03:39:40.096Z'
- realm > node-pre-gyp > request > hawk > hoek:
patched: '2018-06-22T03:39:40.096Z'
- realm > node-pre-gyp > request > hawk > boom > hoek:
patched: '2018-06-22T03:39:40.096Z'
- realm > node-pre-gyp > request > hawk > sntp > hoek:
patched: '2018-06-22T03:39:40.096Z'
- realm > node-pre-gyp > request > hawk > cryptiles > boom > hoek:
patched: '2018-06-22T03:39:40.096Z'
6 changes: 3 additions & 3 deletions __tests__/__snapshots__/RoomItem.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ exports[`render unread +999 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -868,7 +868,7 @@ exports[`render unread 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -1118,7 +1118,7 @@ exports[`renders correctly 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down
22 changes: 11 additions & 11 deletions __tests__/__snapshots__/Storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -648,7 +648,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -874,7 +874,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -1119,7 +1119,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -1368,7 +1368,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -1613,7 +1613,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -1858,7 +1858,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -2103,7 +2103,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -2348,7 +2348,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -2570,7 +2570,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down Expand Up @@ -2792,7 +2792,7 @@ exports[`Storyshots Channel Cell Direct Messages 1`] = `
undefined,
],
Object {
"backgroundColor": "#cbced1",
"backgroundColor": undefined,
},
]
}
Expand Down
55 changes: 31 additions & 24 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,19 @@ android {

defaultConfig {
applicationId "chat.rocket.reactnative"
minSdkVersion 16
minSdkVersion 19
targetSdkVersion 27
versionCode VERSIONCODE as Integer
versionName "1"
ndk {
abiFilters "armeabi-v7a", "x86"
}
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative55"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

signingConfigs {
Expand Down Expand Up @@ -172,29 +178,30 @@ repositories {
}

dependencies {
compile project(':react-native-i18n')
compile project(':react-native-fabric')
compile project(':react-native-audio')
compile project(":reactnativekeyboardinput")
compile project(':react-native-splash-screen')
compile project(':react-native-video')
compile project(':react-native-push-notification')
compile project(':react-native-svg')
compile project(':react-native-image-picker')
compile project(':react-native-vector-icons')
compile project(':react-native-fetch-blob')
compile project(':react-native-zeroconf')
compile project(':react-native-toast')
compile project(':react-native-fast-image')
compile project(':realm')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:27.1.0"
compile "com.android.support:support-v4:27.1.0"
compile 'com.android.support:customtabs:27.1.0'
compile "com.facebook.react:react-native:+" // From node_modules
compile 'com.facebook.fresco:fresco:1.7.1'
compile 'com.facebook.fresco:animated-gif:1.7.1'
compile('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
implementation project(':react-native-i18n')
implementation project(':react-native-fabric')
implementation project(':react-native-audio')
implementation project(":reactnativekeyboardinput")
implementation project(':react-native-video')
implementation project(':react-native-svg')
implementation project(':react-native-image-picker')
implementation project(':react-native-vector-icons')
implementation project(':react-native-fetch-blob')
implementation project(':react-native-zeroconf')
implementation project(':react-native-toast')
implementation project(':react-native-fast-image')
implementation project(':realm')
implementation project(':react-native-navigation')
implementation project(':reactnativenotifications')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:27.1.0"
implementation "com.android.support:support-v4:27.1.0"
implementation 'com.android.support:customtabs:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.facebook.fresco:fresco:1.7.1'
implementation 'com.facebook.fresco:animated-gif:1.7.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.2@aar') {
transitive = true;
}
}
Expand Down
126 changes: 53 additions & 73 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,76 +1,56 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="chat.rocket.reactnative"
android:versionCode="1"
android:versionName="1.0">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE"/>

<permission
android:name="${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />

<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />

<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
android:resizeableActivity="true"
android:largeHeap="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="RocketChatRN">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="go.rocket.chat" />
<data android:scheme="rocketchat" android:host="room" />
<data android:scheme="rocketchat" android:host="auth" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />



<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
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="${applicationId}" />
</intent-filter>
</receiver>

<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
<service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService"/>
<service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
</application>
package="chat.rocket.reactnative"
android:versionCode="1"
android:versionName="1.0">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission-sdk-23 android:name="android.permission.VIBRATE"/>

<permission
android:name="${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />

<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />

<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
android:resizeableActivity="true"
android:largeHeap="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="RocketChatRN">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="go.rocket.chat" />
<data android:scheme="rocketchat" android:host="room" />
<data android:scheme="rocketchat" android:host="auth" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />

<meta-data android:name="com.wix.reactnativenotifications.gcmSenderId" android:value="673693445664\0"/>
</application>

</manifest>
Loading