Testing Android intents as a receiver.

This commit is contained in:
vdv committed 2022-12-14 21:50:09 +01:00
1 parent b797015c57
commit e90e71d151
4 files changed
+51

No files matched your search

+23
View File
@@ -8,6 +8,29 @@ AndroidFullScreen.isImmersiveModeSupported()
.then(() => AndroidFullScreen.immersiveMode())
.catch(console.warn);
if (window.plugins) {
window.plugins.intentShim.registerBroadcastReceiver(
{
filterActions: ['android.intent.action.VIEW'],
},
function (intent: any) {
console.log({
caller: 'Intent broadcast receiver',
intent,
});
}
);
window.plugins.intentShim.onIntent(function (intent: any) {
console.log({ caller: 'Intent receiver', intent });
});
} else {
console.log({
caller: 'Intent',
message: "window.plugins doesn't exist",
window,
});
}
const App: Component = () => {
return (
<Routes>