This repository was archived by the owner on Mar 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 158
Intents looping repeatedly #125
Copy link
Copy link
Open
Description
This plugin works perfectly and I thank you so much for it!
However, I'm experiencing some issues with intents occurring multiple times. My context is an unofficial mobile client for the children's programming site Scratch. I'm using this plugin to offer users the opportunity to forward links from the Scratch website directly to the app. Opening with my app works fine, but when you select "Open with Chrome", the "open with" popup appears up to four or five times before it finally opens the site. Any ideas of what could be causing this? Here's my only implementation of your plugin:
import {
isPlatform
} from '@ionic/vue';
if (isPlatform('android')) {
try {
window.plugins.intentShim.onIntent(function(intent) {
let uri = utils.matchRegexes(intent.data);
if (uri.type == "homepage") {
return 0;
} else if (uri.type == "project" || uri.type == "studio") {
window.location.replace(`/tabs/tab1?${uri.type}=${uri.id}`);
}
});
} catch {
console.error('Could not find Android Intent Shim plugin - see https://ionicframework.com/docs/native/web-intent');
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels