This repository was archived by the owner on Feb 7, 2019. It is now read-only.
File tree Expand file tree Collapse file tree
app/App_Resources/Android
native-src/ios/PushPlugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 android:xlargeScreens=" true" />
1212
1313 <uses-sdk
14- android:minSdkVersion=" 17 "
14+ android:minSdkVersion=" 19 "
1515 android:targetSdkVersion=" __APILEVEL__" />
1616
1717 <uses-permission android : name =" android.permission.READ_EXTERNAL_STORAGE" />
Original file line number Diff line number Diff line change 2929 "nativescript-dev-typescript" : " ~0.6.0" ,
3030 "nativescript-dev-webpack" : " ~0.14.0" ,
3131 "tslint" : " ^5.8.0" ,
32- "typescript" : " ~2.7.2 "
32+ "typescript" : " ~2.8.1 "
3333 },
3434 "scripts" : {
3535 "build.plugin" : " cd ../src && npm run build" ,
Original file line number Diff line number Diff line change @@ -143,18 +143,18 @@ - (void)my_application:(UIApplication *)application didReceiveRemoteNotification
143143 }
144144 NSLog (@" didReceiveNotification" );
145145
146- UIApplicationState appState = UIApplicationStateActive;
147- if ([application respondsToSelector: @selector (applicationState )]) {
148- appState = application.applicationState ;
149- }
150-
151- if (appState == UIApplicationStateActive) {
152- [Push sharedInstance ].notificationMessage = userInfo;
153- [Push sharedInstance ].isInline = YES ;
154- [[Push sharedInstance ] notificationReceived ];
155- } else {
156- [Push sharedInstance ].launchNotification = userInfo;
157- }
146+ UIApplicationState appState = UIApplicationStateActive;
147+ if ([application respondsToSelector: @selector (applicationState )]) {
148+ appState = application.applicationState ;
149+ }
150+
151+ if (appState == UIApplicationStateActive || appState == UIApplicationStateBackground ) {
152+ [Push sharedInstance ].notificationMessage = userInfo;
153+ [Push sharedInstance ].isInline = appState == UIApplicationStateActive ;
154+ [[Push sharedInstance ] notificationReceived ];
155+ } else {
156+ [Push sharedInstance ].launchNotification = userInfo;
157+ }
158158}
159159
160160- (void )my_application : (UIApplication *)application didFailToRegisterForRemoteNotificationsWithError : (NSError *)error {
You can’t perform that action at this time.
0 commit comments