Skip to content

Commit 512fb03

Browse files
author
Kat King
authored
Merge pull request TwilioDevEd#582 from TwilioDevEd/viktormuller-patch-2
Notify - Adds instance id service sample
2 parents f820073 + 4445514 commit 512fb03

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class MyInstanceIDService extends FirebaseInstanceIdService {
2+
3+
private static final String TAG = "NotifyFbIIDService";
4+
5+
/**
6+
* Called if InstanceID token is updated. This may occur if the security of
7+
* the previous token had been compromised. Note that this is called when the InstanceID token
8+
* is initially generated so this is where you would retrieve the token.
9+
*/
10+
// [START refresh_token]
11+
@Override
12+
public void onTokenRefresh() {
13+
Intent intent = new Intent(this, RegistrationIntentService.class);
14+
startService(intent);
15+
}
16+
// [END refresh_token]
17+
18+
}

0 commit comments

Comments
 (0)