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
a164f490
Commit
a164f490
authored
Apr 13, 2017
by
Libin Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix vibration
parent
f6157b0b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
...in/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
+1
-1
index.js
index.js
+3
-0
package.json
package.json
+1
-1
No files found.
android/src/main/java/com/evollu/react/fcm/FIRLocalMessagingHelper.java
View file @
a164f490
...
@@ -156,7 +156,7 @@ public class FIRLocalMessagingHelper {
...
@@ -156,7 +156,7 @@ public class FIRLocalMessagingHelper {
//vibrate
//vibrate
if
(
bundle
.
containsKey
(
"vibrate"
)){
if
(
bundle
.
containsKey
(
"vibrate"
)){
long
vibrate
=
bundle
.
getLong
(
"vibrate"
,
Math
.
round
(
bundle
.
getDouble
(
"vibrate"
,
bundle
.
getInt
(
"vibrate"
))
));
long
vibrate
=
Math
.
round
(
bundle
.
getDouble
(
"vibrate"
,
DEFAULT_VIBRATION
));
if
(
vibrate
>
0
){
if
(
vibrate
>
0
){
notification
.
setVibrate
(
new
long
[]{
0
,
vibrate
});
notification
.
setVibrate
(
new
long
[]{
0
,
vibrate
});
}
else
{
}
else
{
...
...
index.js
View file @
a164f490
...
@@ -49,6 +49,9 @@ FCM.scheduleLocalNotification = function(details) {
...
@@ -49,6 +49,9 @@ FCM.scheduleLocalNotification = function(details) {
if
(
!
details
.
id
)
{
if
(
!
details
.
id
)
{
throw
new
Error
(
"
id is required for scheduled notification
"
);
throw
new
Error
(
"
id is required for scheduled notification
"
);
}
}
if
(
!
details
.
fire_date
)
{
throw
new
Error
(
"
fire_date is required for scheduled notification
"
);
}
details
.
local_notification
=
true
;
details
.
local_notification
=
true
;
RNFIRMessaging
.
scheduleLocalNotification
(
details
);
RNFIRMessaging
.
scheduleLocalNotification
(
details
);
};
};
...
...
package.json
View file @
a164f490
...
@@ -24,5 +24,5 @@
...
@@ -24,5 +24,5 @@
"type"
:
"git"
,
"type"
:
"git"
,
"url"
:
"git+https://github.com/evollu/react-native-fcm.git"
"url"
:
"git+https://github.com/evollu/react-native-fcm.git"
},
},
"version"
:
"6.2.
1
"
"version"
:
"6.2.
2
"
}
}
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