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
3335ccee
Commit
3335ccee
authored
Sep 15, 2017
by
Libin Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add sound example
parent
a636db61
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
2 deletions
+12
-2
Examples/simple-fcm-client/android/app/src/main/res/raw/bell.mp3
...s/simple-fcm-client/android/app/src/main/res/raw/bell.mp3
+0
-0
Examples/simple-fcm-client/app/App.js
Examples/simple-fcm-client/app/App.js
+1
-0
Examples/simple-fcm-client/app/PushController.js
Examples/simple-fcm-client/app/PushController.js
+7
-2
Examples/simple-fcm-client/ios/SimpleFcmClient.xcodeproj/project.pbxproj
...-fcm-client/ios/SimpleFcmClient.xcodeproj/project.pbxproj
+4
-0
Examples/simple-fcm-client/ios/bell.mp3
Examples/simple-fcm-client/ios/bell.mp3
+0
-0
No files found.
Examples/simple-fcm-client/android/app/src/main/res/raw/bell.mp3
0 → 100644
View file @
3335ccee
File added
Examples/simple-fcm-client/app/App.js
View file @
3335ccee
...
...
@@ -42,6 +42,7 @@ export default class App extends Component {
title
:
'
Hello
'
,
body
:
'
Test Notification
'
,
priority
:
"
high
"
,
sound
:
"
bell.mp3
"
,
show_in_foreground
:
true
,
picture
:
'
https://firebase.google.com/_static/af7ae4b3fc/images/firebase/lockup.png
'
});
...
...
Examples/simple-fcm-client/app/PushController.js
View file @
3335ccee
...
...
@@ -11,8 +11,13 @@ export default class PushController extends Component {
super
(
props
);
}
componentDidMount
()
{
FCM
.
requestPermissions
();
async
componentDidMount
()
{
try
{
let
result
=
await
FCM
.
requestPermissions
({
badge
:
false
,
sound
:
true
,
alert
:
true
});
}
catch
(
e
){
console
.
error
(
e
);
}
FCM
.
getFCMToken
().
then
(
token
=>
{
console
.
log
(
"
TOKEN (getFCMToken)
"
,
token
);
...
...
Examples/simple-fcm-client/ios/SimpleFcmClient.xcodeproj/project.pbxproj
View file @
3335ccee
...
...
@@ -23,6 +23,7 @@
140ED2AC1D01E1AD002B40FF
/* libReact.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
146834041AC3E56700842450
/* libReact.a */
;
};
146834051AC3E58100842450
/* libReact.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
146834041AC3E56700842450
/* libReact.a */
;
};
3A6D62911E2044AB00D0D2C7
/* libz.tbd in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3A6D62901E2044AB00D0D2C7
/* libz.tbd */
;
};
3AC87E631F6C190900194883
/* bell.mp3 in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
3AC87E621F6C190900194883
/* bell.mp3 */
;
};
4339BFE81DAEE9D100F53B62
/* GoogleService-Info.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
4339BFE71DAEE9D100F53B62
/* GoogleService-Info.plist */
;
};
5FE70723D2AE04BF2D98342D
/* libPods-SimpleFcmClientTests.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0E8C044191FA88F1BCCF08BD
/* libPods-SimpleFcmClientTests.a */
;
};
6976C617E52062E3EE272128
/* libPods-SimpleFcmClient.a in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A959965489E40CE19F2B06B4
/* libPods-SimpleFcmClient.a */
;
};
...
...
@@ -259,6 +260,7 @@
146833FF1AC3E56700842450
/* React.xcodeproj */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"wrapper.pb-project"
;
name
=
React.xcodeproj
;
path
=
"../node_modules/react-native/React/React.xcodeproj"
;
sourceTree
=
"<group>"
;
};
3A6D628E1E20449400D0D2C7
/* libc++.tbd */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"sourcecode.text-based-dylib-definition"
;
name
=
"libc++.tbd"
;
path
=
"usr/lib/libc++.tbd"
;
sourceTree
=
SDKROOT
;
};
3A6D62901E2044AB00D0D2C7
/* libz.tbd */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"sourcecode.text-based-dylib-definition"
;
name
=
libz.tbd
;
path
=
usr/lib/libz.tbd
;
sourceTree
=
SDKROOT
;
};
3AC87E621F6C190900194883
/* bell.mp3 */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
audio.mp3
;
path
=
bell.mp3
;
sourceTree
=
"<group>"
;
};
4339BFE31DAEBB4800F53B62
/* module.modulemap */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
"sourcecode.module-map"
;
path
=
module.modulemap
;
sourceTree
=
"<group>"
;
};
4339BFE61DAED4D900F53B62
/* SimpleFcmClient.entitlements */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.entitlements
;
name
=
SimpleFcmClient.entitlements
;
path
=
SimpleFcmClient/SimpleFcmClient.entitlements
;
sourceTree
=
"<group>"
;
};
4339BFE71DAEE9D100F53B62
/* GoogleService-Info.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
"GoogleService-Info.plist"
;
sourceTree
=
"<group>"
;
};
...
...
@@ -396,6 +398,7 @@
13B07FB61A68108700A75B9A
/* Info.plist */
,
13B07FB11A68108700A75B9A
/* LaunchScreen.xib */
,
13B07FB71A68108700A75B9A
/* main.m */
,
3AC87E621F6C190900194883
/* bell.mp3 */
,
);
name
=
SimpleFcmClient
;
sourceTree
=
"<group>"
;
...
...
@@ -858,6 +861,7 @@
buildActionMask
=
2147483647
;
files
=
(
13B07FBF1A68108700A75B9A
/* Images.xcassets in Resources */
,
3AC87E631F6C190900194883
/* bell.mp3 in Resources */
,
13B07FBD1A68108700A75B9A
/* LaunchScreen.xib in Resources */
,
4339BFE81DAEE9D100F53B62
/* GoogleService-Info.plist in Resources */
,
);
...
...
Examples/simple-fcm-client/ios/bell.mp3
0 → 100644
View file @
3335ccee
File added
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