This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const admin = require('firebase-admin'); | |
admin.initializeApp(functions.config().firebase); | |
var db = admin.firestore(); | |
exports.myUpdateTrigger = functions.firestore | |
.document('recruits/{recruitId}') | |
.onUpdate(event => { | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.myUpdateTrigger = functions.firestore | |
.document('recruits/{recruitId}') | |
.onUpdate(event => { | |
... | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FCMService extends FirebaseMessagingService { | |
public FCMService() { | |
} | |
@Override | |
public void onMessageReceived(RemoteMessage remoteMessage) { | |
super.onMessageReceived(remoteMessage); | |
if (remoteMessage.getData().size() > 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta-data | |
android:name="com.google.firebase.messaging.default_notification_icon" | |
android:resource="@drawable/ic_user_add" /> | |
<meta-data | |
android:name="com.google.firebase.messaging.default_notification_color" | |
android:resource="@color/colorAccent" /> | |
... | |
<service android:name=".service.fcm.FCMService"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FCMInstanceIdService extends FirebaseInstanceIdService { | |
@Override | |
public void onTokenRefresh() { | |
String refreshedToken = FirebaseInstanceId.getInstance().getToken(); | |
... | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<service android:name=".service.fcm.FCMInstanceIdService"> | |
<intent-filter> | |
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> | |
</intent-filter> | |
</service> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onSaveInstanceState(Bundle outState); | |
public void onViewStateRestored(@Nullable Bundle savedInstanceState); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onViewStateRestored(@Nullable Bundle savedInstanceState) { | |
super.onViewStateRestored(savedInstanceState); | |
if (savedInstanceState != null) { | |
mLayoutManagerSavedState = savedInstanceState.getParcelable("key"); | |
} | |
} | |
@Override | |
public void onStart() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onSaveInstanceState(Bundle outState) { | |
super.onSaveInstanceState(outState); | |
outState.putParcelable("key", mRecyclerView.getLayoutManager().onSaveInstanceState()); | |
} |
NewerOlder