Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-fcm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
react-native-fcm
Commits
f8aa45b0
Commit
f8aa45b0
authored
Oct 07, 2016
by
Libin Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add show_in_foreground option
parent
7956f1cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
16 deletions
+23
-16
android/react-native-fcm.iml
android/react-native-fcm.iml
+11
-11
android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
...in/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
+3
-1
ios/RNFIRMessaging.xcodeproj/xcuserdata/LLu.xcuserdatad/xcschemes/xcschememanagement.plist
...erdata/LLu.xcuserdatad/xcschemes/xcschememanagement.plist
+1
-1
ios/RNFIRMesssaging.m
ios/RNFIRMesssaging.m
+8
-3
No files found.
android/react-native-fcm.iml
View file @
f8aa45b0
...
...
@@ -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/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"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<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"
/>
...
...
@@ -81,6 +73,14 @@
<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"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/aidl"
isTestSource=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/src/test/java"
isTestSource=
"true"
/>
<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"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/annotations"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/assets"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/intermediates/blame"
/>
...
...
@@ -99,7 +99,7 @@
<excludeFolder
url=
"file://$MODULE_DIR$/build/outputs"
/>
<excludeFolder
url=
"file://$MODULE_DIR$/build/tmp"
/>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 23 Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Android API 23 Platform
(1)
"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
exported=
""
name=
"okio-1.9.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"fresco-0.11.0"
level=
"project"
/>
...
...
@@ -110,14 +110,14 @@
<orderEntry
type=
"library"
exported=
""
name=
"firebase-core-9.4.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"recyclerview-v7-23.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"okhttp-urlconnection-3.4.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"react-native-0.33.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"android-jsc-r174650"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"react-native-0.34.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-v4-23.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"firebase-common-9.4.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"firebase-iid-9.4.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"support-annotations-23.2.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"fbcore-0.11.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"appcompat-v7-23.0.1"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"fbcore-0.11.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"imagepipeline-0.11.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"firebase-messaging-9.4.0"
level=
"project"
/>
<orderEntry
type=
"library"
exported=
""
name=
"library-2.4.0"
level=
"project"
/>
...
...
android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
View file @
f8aa45b0
...
...
@@ -160,7 +160,9 @@ public class FIRLocalMessagingHelper {
Intent
i
=
new
Intent
(
"com.evollu.react.fcm.ReceiveLocalNotification"
);
i
.
putExtras
(
bundle
);
mContext
.
sendOrderedBroadcast
(
i
,
null
);
}
else
{
}
if
(!
mIsForeground
||
bundle
.
getBoolean
(
"show_in_foreground"
)){
Intent
intent
=
new
Intent
(
mContext
,
intentClass
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
intent
.
putExtras
(
bundle
);
...
...
ios/RNFIRMessaging.xcodeproj/xcuserdata/LLu.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
f8aa45b0
...
...
@@ -7,7 +7,7 @@
<key>
RNFIRMessaging.xcscheme
</key>
<dict>
<key>
orderHint
</key>
<integer>
7
</integer>
<integer>
9
</integer>
</dict>
</dict>
<key>
SuppressBuildableAutocreation
</key>
...
...
ios/RNFIRMesssaging.m
View file @
f8aa45b0
...
...
@@ -276,9 +276,14 @@ RCT_EXPORT_METHOD(getBadgeNumber: (RCTPromiseResolveBlock)resolve rejecter:(RCTP
-
(
void
)
handleNotificationReceived
:(
NSNotification
*
)
notification
{
NSMutableDictionary
*
data
=
[[
NSMutableDictionary
alloc
]
initWithDictionary
:
notification
.
userInfo
];
[
data
setValue
:
@
(
RCTSharedApplication
().
applicationState
==
UIApplicationStateInactive
)
forKey
:
@"opened_from_tray"
];
[
_bridge
.
eventDispatcher
sendDeviceEventWithName
:
FCMNotificationReceived
body
:
data
];
if
([
notification
.
userInfo
valueForKey
:
@"opened_from_tray"
]
==
nil
){
NSMutableDictionary
*
data
=
[[
NSMutableDictionary
alloc
]
initWithDictionary
:
notification
.
userInfo
];
[
data
setValue
:
@
(
RCTSharedApplication
().
applicationState
==
UIApplicationStateInactive
)
forKey
:
@"opened_from_tray"
];
[
_bridge
.
eventDispatcher
sendDeviceEventWithName
:
FCMNotificationReceived
body
:
data
];
}
else
{
[
_bridge
.
eventDispatcher
sendDeviceEventWithName
:
FCMNotificationReceived
body
:
notification
.
userInfo
];
}
}
@end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment