post Message from React Native to Webview code example
Example: react native webview postmessage example
if(navigator.appVersion.includes('Android')){
document.addEventListener("message", function (data) {
alert("you are in android OS");
});
}
else {
window.addEventListener("message", function (data) {
alert("you are in android OS");
});
}