Yeswanth Swami
First WalkIn Technologies, India
Native Realm (Java)
JS Realm
(Javascript)
Bridge
(C++/Java)
UI thread
Button
JS thread
Runs Js
View Managers
Dispatch view updates
Update UI
UI thread
Button
JS thread
Runs Js
View Managers
Dispatch view updates
Update UI
Dispatch view updates
Update UI
Runs Js
x 60/sec
Animated.sequence([
// decay, then spring to start and twirl
Animated.decay(position, {
// coast to a stop
velocity: {x: gestureState.vx, y: gestureState.vy}, // velocity from gesture release
deceleration: 0.997,
}),
Animated.parallel([
// after decay, in parallel:
Animated.spring(position, {
toValue: {x: 0, y: 0}, // return to start
}),
Animated.timing(twirl, {
// and twirl
toValue: 360,
}),
]),
]).start();
InteractionManager.runAfterInteractions(() => {
// ...long-running synchronous task...
});
Let's say you are transitioning from Screen1 to Screen2 and need to do some computation before rendering Screen2
App Backend
FCM
Mobile
Request for Token
Token `A`
Store Token `A`
Send Notifications to Device with Token `A`
Push Notification
Token
Get Token from FCM & store it in Backend
Pretty straightforward, right?
firebase.messaging().getToken(
(token) => {
//Send the token to the App backend
});
firebase.notifications().
onNotificationDisplayed((data) => {
//Handle deeplinks
});
Deeplinks
Get any Deeplink data from the Notification payload and take user to the specific screen
eg. Clicking on a notification, I take the user to the transactions page (instead of the home page)
1. Group notifications
2. Custom Actions
Extend your class from
FirebaseMessagingService
How can React-Native developers proactively catch up with Native SDK changes?
From Android 26, all notifications need to be assigned a Channel (https://developer.android.com/training/notify-user/channels)
Solution for uniquely identifying an iOS app… iOS Device Check API, available from iOS 11 (https://developer.apple.com/documentation/devicecheck)