I have a web-page which checks the user agent and redirects accordingly:
Opend the appstore to download the app for first time/open the app if app is already installed
Redirects to desktop site for all other user agents
now the issue here is: if the app is deleted it throws error like error: page URI not supported.
Ss there a way to check if the user has deleted the app?
PS(can only use javascript to do this).Thanks
Related
I have a web app something like slack which is used for chatting and when user is offline then we send the notification that "you have a new message". The notification is html5 push notification, so it works when user has not opened web app.
I have recently created an executable app for people who chat all day. But problem is that when a new message is coming : notification coming from exe app and browser both.
So my question is : Can we find if web app and exe app both are active in one device? So that we can supress one of the notification. Does a pc have something like common id which we can access from javascript in browser and executable too?
Note :- I have information stored in server that web app is active and exe is active, i only need to find if they are from same device.
Thanks in advance. Please let me know your solution.
After a lot of hit and trial with different solutions - I found a solution.
I am embedding a http server in the exe app which let me communicate with web app. In the web app, i have added a web worker, which will ping the exe app server every 10 sec. If response received means exe app is active, then i turn off the notification on server by calling api. This will also make sure when the exe app is quitted, web worker wont get any response means exe is not active, so it activates the notification.
Now another issue was that - after installing the app, user didn't open the web app and he is getting two notification still. For overcoming this - i open the web app url when the exe app starts for the first time and it detects the status and turn off the browser notification. In the same process - i also save the browserId (a unique guid to identify the browser ) to the exe app and whenever exe app starts, i call the api to turn off the notification for these browserId.
Hope this helps someone.
I am basically trying to open wechat app from mobile web browser for payment. But any of the Deeplink url scheme I tried like these:
https://spacekid.me/weixin-url-schemes/
https://stackoverflow.com/a/35576003/3326275
However all of them giving me following error though application opens:
I tried to use any of the urls, all of them are giving me same error as above. I want to open payment URL in web app. Leave that alone, any of the links.
Any one knows :
Why am I facing error, is there any way to open any deeplink without error.
How to open payment URL from browser to app so he can pay via app? Note that I able to generate business payment link such as weixin://wxpay/bizpayurl?pr=psg07It , but how to open in app without facing error as in image above.
Thanks
I seen few mails with links opens their respective Applications if installed otherwise opens link in browser.
Searched for same result and got this link.
Javascript function not working in html content, I have read that many mail client do not support javascript due to security reason.
HTML with href link of custom url Scheme working fine, if app installed on device. But app not installed on device then what to do ?
App name
How to handle if app not installed on device how to open browser with respective link ?
I have an android app that can be accessed through a web browser too. I need to put a banner to let the user install the android application. How can i tell (if the user enters to the application through the web browser) using javascript or jquery, if the android app is already installed on his mobile phone?
All i want to do is: If the user clics the banner and the app is already installed, open the android app. Otherwise, redirect the user to the playstore to let him install the app.
Let's say your app is uploaded on both Apple AppStore and Google Play stores.
You need to:
Sniff in your webpage which OS is installed from the device accessing your page
good link to find how => here
Enable deep linking to listen for exactly same link from your mobile native app
for Android you need to register your main activity or any other activity to listen for these links
for iOS - no idea honestly, look around or find a 3rd party service
code for Google Play with deep link. And the deep link is same as your website page you want to cache/index in Google Search (or any other search engine)
sample link to index/use => http://my_website.com/results
// below snipplet need to be for Android devices only
// i.e. need to sniff and have if/else validation for Android, iOS, desktop and so on
// will call with 25 mills delay in case deep link fails, i.e. no installed app
setTimeout(function () { window.location = "https://play.google.com/details?id=com.foo.myapp"; }, 25);
// try to load the deep link URL
window.location = "http://my_website.com/results";
repeat above for iOS and desktop/Windows Mobile
Additional advantage of above is the full app indexing without the lame App Indexing excuse from Google (min sdk no more than 17, Chrome for Android availability and so forth limitations).
There is no way to detect if an app is installed using Javascript.
However you can get the behavior you describe and you don't even need any javascript:
Choose an URL for your app on a web server you own and make the banner link to it.
Set this web URL as a deep link handled by your app by specifing it in your app's manifest. It should open the main Activity.
On your web server, configure this URL to redirect to the Play Store URL of your app. Optional: if your app is also on iOS, you could detect the iOS browser and display something else.
If the app is installed it will handle the URL and open, otherwise the browser will follow the link and the redirect and the Play Store app will open to handle the Play Store URL to your app.
In iOS App, to launch an application from safari, the URL scheme is something like this, Launch App from URL
is it possible to re-direct URL to Appstore pointing to the App if the particular app is not installed in the device,
Basically what i am looking
If app is already installed then let it be launch from the URL "A"
if app is not installed let it point to app store and promot user to download app,
there are examples of how to link to app to app store, but not able to add condition in the js when to launch custom URL scheme if app is there, else launch app store.
Update :
the answer provided and in the comment take me to the page which says how to launch the app store with specific app that's secdonary requirement, initially i need to have some js code which can detect whether the device has an app specific to URL scheme if not then open the App Store app page
element
I'm not sure if you can check if a third party app is installed on your device by code. I think only when you know the url-scheme of this specific 3rd party app you can check by
BOOL canOpen = NO;
canOpen = [[UIApplication sharedApplication] canOpenURL:url];
if (canOpen) {
[[UIApplication sharedApplication] openURL:url];
} else {
[[UIApplication sharedApplication] openURL:#"itms://itunes.apple.com/us/app/mensa-essen/id742570910?ls=1&mt=8"]; }