Skip to content

Commit b917ea5

Browse files
Push service fixes (#76)
* Null checks added for application and context in push service * Changes in messaging service * SDK version updated * Change linebreak to LF * moving onNotification call to bottom * Changelog update and sdk version updated * Merge branch 'staging' of https://github.com/Countly/countly-sdk-react-native-bridge into pushServiceFixes * Update CountlyMessagingService.java * Update CountlyMessagingService.java * Update CHANGELOG.md * Update CountlyMessagingService.java Co-authored-by: ArtursKadikis <[email protected]>
1 parent ac6fd8f commit b917ea5

File tree

7 files changed

+14
-8
lines changed

7 files changed

+14
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 20.11.16
2+
* Fixed push notification issue where some apps were unable to display push notificaitons in their kill state.
3+
* Underlying android SDK version is 20.11.12
4+
* Underlying iOS SDK version is 20.11.3
5+
16
## 20.11.15
27
* Adding a mitigation when app is killed and received push notifications.
38
* Underlying android SDK version is 20.11.12

CountlyReactNative.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'CountlyReactNative'
3-
s.version = '20.11.15'
3+
s.version = '20.11.16'
44
s.license = {
55
:type => 'COMMUNITY',
66
:text => <<-LICENSE

android/src/main/java/ly/count/android/sdk/react/CountlyMessagingService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public void onMessageReceived(RemoteMessage remoteMessage) {
3030
if(Countly.sharedInstance().isLoggingEnabled()) {
3131
Log.d(Countly.TAG, "[CountlyMessagingService] got new message: " + remoteMessage.getData().toString());
3232
}
33-
CountlyReactNative.onNotification(remoteMessage.getData());
34-
3533

3634
if(!Countly.sharedInstance().isInitialized()) {
3735
int mode = CountlyPush.getLastMessagingMethod(this);
@@ -72,10 +70,13 @@ public void onMessageReceived(RemoteMessage remoteMessage) {
7270
Log.i(Countly.TAG, "[CountlyMessagingService] Message wasn't handled by Countly SDK because API level is too low for Notification support or because currentActivity is null (not enough lifecycle method calls)");
7371
}
7472
}
73+
74+
// 'onNotification' should be called at the end of 'onMessageReceived'. This is due to an unknown issue that prevents showing notifications from the "killed" state for some app/hardware configurations
75+
CountlyReactNative.onNotification(remoteMessage.getData());
7576
}
7677

7778
@Override
7879
public void onDeletedMessages() {
7980
super.onDeletedMessages();
8081
}
81-
}
82+
}

android/src/main/java/ly/count/android/sdk/react/CountlyReactNative.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public String toString(){
7575
public class CountlyReactNative extends ReactContextBaseJavaModule implements LifecycleEventListener {
7676

7777
public static final String TAG = "CountlyRNPlugin";
78-
private String COUNTLY_RN_SDK_VERSION_STRING = "20.11.15";
78+
private String COUNTLY_RN_SDK_VERSION_STRING = "20.11.16";
7979
private String COUNTLY_RN_SDK_NAME = "js-rnb-android";
8080

8181
private static CountlyConfig config = new CountlyConfig();

example/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rm App.js
1111
curl https://raw.githubusercontent.com/Countly/countly-sdk-react-native-bridge/master/example/App.js --output App.js
1212
curl https://raw.githubusercontent.com/Countly/countly-sdk-react-native-bridge/master/example/Example.js --output Example.js
1313

14-
yarn add [email protected].15
14+
yarn add [email protected].16
1515

1616
cd ./ios
1717
pod install

ios/src/CountlyReactNative.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ @interface CountlyFeedbackWidget ()
2121
+ (CountlyFeedbackWidget *)createWithDictionary:(NSDictionary *)dictionary;
2222
@end
2323

24-
NSString* const kCountlyReactNativeSDKVersion = @"20.11.15";
24+
NSString* const kCountlyReactNativeSDKVersion = @"20.11.16";
2525
NSString* const kCountlyReactNativeSDKName = @"js-rnb-ios";
2626

2727
CountlyConfig* config = nil;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "countly-sdk-react-native-bridge",
3-
"version": "20.11.15",
3+
"version": "20.11.16",
44
"author": "Countly <[email protected]> (https://count.ly/)",
55
"bugs": {
66
"url": "https://github.com/Countly/countly-sdk-react-native-bridge/issues"

0 commit comments

Comments
 (0)