Open
Description
Hello!!
Nice project that you have here!
I would like to improve this project with a simple snipet that detect that app is already installed and redirect to it or app wans't installed and redirect to app store.
It could improve the user experience =D
Here are the proposal:
iOS
When smartbanner opens on iOS, the following snippet may apply:
var ifrm = document.getElementById("innerFrame");
function redirect_to_store() {
if (!document.hidden) {
window.location.href = store_link;
}
}
try {
ifrm.src = app_link;
} catch (e) {
window.location.href = store_link;
}
setTimeout (redirect_to_store, 1000);
Android
On android, we can use something called Intent Links. Here is a post with better explanation.
We can define some metas with data needed and i can made an PullRequest =)
Hope i can help :)