I have a friend who created an online betting game. Now, in order to deploy it on mobile, I just created a webview to display the website. First, you have to register. After registration on my phone, I opened my Gmail. I clicked the Email Validation Link, but instead of opening the webpage on the Webview, the browser opened. We are trying to test it. I hope someone with knowledge in php,javascript,css or ajax. Please help Thanks.
I'm assuming the webview is hosted in a thin app you made, and you'd like the email verification link to open up inside that app.
In that case, on Android, the way you do this is with Intents (wiki overview, tutorial, docs).
You would have to mark up the link in the email with a special scheme that Android would interpret to mean "Open up my thin app with these parameters." So, rather than:
Verify Email
You would have
Verify Email
Here is a related StackOverflow question to follow up with (they use JavaScript instead of a proper href -- you'll have to test): Invoke android application from browser
Good luck!
You need override WebViewClient.shouldOverrideUrlLoading() having it return false (please see http://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading(android.webkit.WebView, java.lang.String))and set the WebViewClient on your WebView (please see http://developer.android.com/reference/android/webkit/WebView.html#setWebViewClient(android.webkit.WebViewClient))
Related
I did a few researches yet either the answer is outdated (cordova changed a lot since the answer) or in unanswered.
This is what i need:
I have a phone number on html page which is parte of a cordova app.
All that i need is to know how to send this number to whatsapp so either te user can add the number as contact and therefore be able to be prompted to send a message or simply open the message dialog.
Such behavior need to work on android and on ios too.
Any guidance is welcome.
I guess you are basically looking for sharing the data from your app to an other app (in this case whatsapp). I believe, social sharing plugin should help you out in this case which lets your share link, text and images to apps like facebook, whatsapp etc..
Please look at the official social sharing plugin link for more info. Hope it helps.
I need to check if app is installed on iPhone or android device, using javascript code only. As i am working on html website.
I have used
window.location="appname://";
but it makes me to open an app.
Thanks in advance.
As stated in the comments there are security and privacy reasons surrounding why you are not able to do what you are asking.
However, #CommonsWare, has already given a workaround to this problem, in a similar question, that has already been asked:
Fortunately, this is not possible, for obvious privacy reasons.
The closest that you can do is in the application, have an activity
that has an for some URL structure, and have a link in
the mobile Web site to a matching URL.
If the user clicks the link and the app is installed, the activity
will be a chooser option for the user.
If the user clicks the link and the app is not installed, or they
choose to stick with their Web browser from the chooser, whatever Web
page exists at that URL will be displayed (E.g., instructions of how
to download the app).
I am developing a windows 8.1 app using javascript and html5. I want to integrate facebook login.When I searched I found the following documentations
1.https://developers.facebook.com/docs/facebook-login/login-for-windows-phone
2.https://developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.3
which one should I use.
I suggest you go through the first link since it mentions how to integrate facebook SDK in windows phone. The other link mentions about Facebook integration through javascript in web.
I tried the first one, I used js function in wp8
Windows.System.Launcher.launchUriAsync("fbconnect://authorize?cliend_id=My_appId&scope=basic_info&redirect_uri=msft-my_prod_id://authorize").then(function (success){
})
It works for me, If I'm already logged with facebook app, it return true, else it show me Facebook Login Page. But I don't obtain Facebook userId, i'm able only to intercept boolean value for success or not. Did you get a solution for login and obtain Facebook userId?
I found the Winjs sdk for Facebook
https://github.com/Thuzi/facebook-winjs-sdk
it works for me.
For windows phone you need to use
Windows.Security.Authentication.Web.WebAuthenticationBroker.authenticateAndContinue instead of Windows.Security.Authentication.Web.WebAuthenticationBroker.authenticateAsync during the login
I am trying to find out if it is possible to create a share button on a website that shares to WeChat.
So just as you would with Twitter or Facebook to share a message or link back to the social network.
Has anyone managed to do this? Or has anyone confirmed that it is not possible?
thanks!
You can use the AddThis service to embed a range of share buttons, including WeChat.
It doesn't seem to support opening the WeChat app with a pre-populated message (like when sharing to Twitter/Facebook) - probably because the WeChat app doesn't support this - but works around it in two ways:
On Desktop: clicking the share button displays a QR code which the user can scan using their mobile device
On Mobile: tapping the share button displays a share URL, a button to easily copy the URL, and another button to open the WeChat app. The user needs to still perform a couple of steps manually, but it's about the easiest it's gonna get.
Hope that helps.
They publish an APK for Android and iOS that allows you to do this from another native app.
As far as I'm aware, WeChat, like WhatsApp, does not support any web browser access so I don't think it's possible.
http://dev.wechat.com/wechatapi
Perhaps somewhere in the API you can create a share button on a website that opens the Android or iOS apps, but I don't think any WeChat access is possible from the desktop.
The answer in this SO question should help you WeChat sharing, how to change re-share description and thumbail?. It refers to a Javascript API WeixinJSBidge http://mp.weixin.qq.com/qa/index.php?qa=3163 with the documentation in Chinese but the code is still readable. Hope it helps you!
I have tried to implement the integration of WeChat on Meteor before. The questions are:
1. Did you have the correct package ID and signature?
2. Did you get approved from WeChat and get the WeChat App ID?
I follow the tutorials and get my app work here: http://blog.sanuker.com/?p=691
Hope it helps! Good luck.
I spent a lot of time to search for solution but without result.
I check this topics :
Website Bookmark/ Shortcut Icon for Android Help. Cant get passed standard ribbon icon
Whick is very nice ,but here user must click on bookmark.That`s not what i need. May be button,or automatic script that prompt user for this and created automaticaly.For example something like this :
http://socialmedia.biz/2012/02/21/encourage-visitors-to-save-your-site-as-a-mobile-shortcut/
But it`s work only on Apple devices .. What im looking for is a similar solution for android.
Is this possible at all?
May be the only solution is to create simple app that act like a shortcut to my web page?
The page that is talking about has a mobile version ..
Have you looked here [for Chrome]? https://developers.google.com/chrome/mobile/docs/installtohomescreen
May be the only solution is to create simple app that act like a shortcut to my web page? The page that is talking about has a mobile version ..
If this is "allowed" and doesn't go against too many guidelines, this might be your only option. Basically you'd want to create a one Activity application and all it does is call the default Intent for your web page. This should push the user into the default Browser.
You could put the app in the Google Play store and link to it from the site or a script. I'd call the app something like "SITE_NAME Web Shortcut" and make it clear in the description that the only purpose is to launch the browser -- as previously mentioned this doesnt "feel" like something that should be in an app store, and if users think they're getting something extra you'll definitely get bad reviews.
(I'd also make the Activity with #style/Theme.Transparent)
Please be aware that Chrome has changed the way that installs web apps.
Here are the details: https://developers.google.com/web/updates/2018/06/a2hs-updates
There is an install criteria now:
The web app is not already installed
Meets a user engagement heuristic
Be served over HTTPS
Includes a Web App Manifest that includes:
short_name or name
icons - must include a 192px and a 512px icon
start_url
display - must be one of fullscreen, standalone, or minimal-ui
prefer_related_applications must not be present, or be false
-Registers a service worker with a fetch handler