-
Notifications
You must be signed in to change notification settings - Fork 7
How do I handle Google services related errors on Android during initialization
Roman Kochkar edited this page Mar 4, 2020
·
2 revisions
SDK provides a method which you can call to display a system dialog which will help users resolve such issues. You will need to handle an error code provided by the library when initialization fails.
mobileMessaging.init({
...
},
() => {
console.log('Init success');
},
error => {
console.log('Init error', JSON.stringify(error));
if (error.code) {
displayErrorDialog(error.code);
}
}
);
function displayErrorDialog(errorCode) {
mobileMessaging.showDialogForError(
errorCode,
() => {
console.log("The issue was resolved by user");
// re-init SDK
},
error => {
console.log('User failed to resolve the issue', JSON.stringify(error));
}
);
}
...
If you have any questions or suggestions, feel free to send an email to [email protected] or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
- Privacy settings
- In‐app chat
- WebRTC Calls and UI
- Migration guides