WebView – Android Studio Tutorial
In this video we will create simple WebView to show a website. We will pass a new WebViewClient, load a URL and enable JavaScript by changing the WebSettings. We are also going to provide proper back navigation by overriding onBackPressed().
Example code for this video:
____________________
Subscribe to my channel:
Want more Android tutorials? Check my playlist section:
Follow me on social media:
Facebook:
Instagram:
Twitter:
Blog:
* * *
I added a link to the code for this video into the description box!
* * *
You are a true genius. everything in this video is very helpful
Thanks
Nice Tutorial man. I am wondering if you can tell me how can I check the internet connection if not connected then load a static screen? Thanks.
Can u please make a video for download url with web view
Very helpful for Android developers
yo, cool tut, thanks bro
Hello sir!! Thanks to you i was able to do my project and create my own Application for the Hotel i work for, so i am very greatful for you!! i created 3 fragment one of them is a webview which is linked to a wordpress site i created aswell and i would like to ask how i could set the back button to do what you just achivied but with the webview being on a different fragment not on the mainactivity window 🙂
I still have an issue every time i click on the button to go to the activity my app crashes. What could it be?
Please help!
I have been doing research on an issue i have, I am looking to combine 2 android studio projects and make 1 app with them. is there any way you could do a video on this?
Your videos are very helpful and very descriptive!
forgot to mention add in manifest : <application android:usesCleartextTraffic="true" .. to avoid net::ERR_CLEARTEXT_NOT_PERMITTED
THANK YOU VERY MATCH >>> I LOVE YOU
Hi, I have a webpage with tel: tag loaded into a webview, which users are able to make calls on clicking the number with tel: tag. But after a few days of usage that link won't work unless I clear the app data, what must be going on here? anyone? any thoughts?
For some reasons may automatically shuts down upon onload. I followed every single step in this tutorial, still not able to work. I need some help.
Great tutorial
how to apply webview.canGoBack inside a fragment, there is on method(onBackPressed) avialable for fragments.
Thank you! Worked perfectly.
how can i do this if me extends Fragment is instead of AppCompatActivity.
sir if i want to call it on fragment? how ?
Another fabulous video.. 🙂 Please make videos on Map Api …
pleas help me
Please I want to open html pages on WEbView but the page does not appear consistent with the application
what is the different use WebSetting.setJavaScriptEnabled and not? I think there isn't different between use and no can you explain it? I'm newbie developer
awesome, your explanation is very good!. thanks a lot
What programme did you use when making this video? Like zooming function i mean…anyway thanks for this great work
how to allow this webview to upload anything from any website because now nothing happens whenever tap on upload a file.
Thank you
wakanda poreba
Compilation failed; see the compiler error output for details.
you deserve
( thank you * 7770 times )
I am trying to load a Webview from my Wix.com site where an Instagram feed is. The feed itself is not shown when i load the app and the navigation bar within the webview can´t be used.
Do i need any other permissions to use Instagram content?
Thank you @Coding in Flow.
Always the best!
Cheers!
Awesome!
Hi
I have a problem:
When I start the Activity the Error : net::ERR_CACHE_MISS comes.
Can you help me?
Thank you!
Thanks a lot. It helped a lot.
Could you please tell me which machine you are using in this video tutorial?
I have made my webview app to see your video but when I transfer the apk to my mobile its not fit my mobile screen My emulator is nexus pro 4 and my mobile phone is Oppo f9 I want to know how its fit all screen size mobile. Thanks in Advance……
hallo sir click url but android app redirect
followed steps, tried url and local file. Ass soon as splash page appears, app crashes and shows close option
hi there, im using a fragment to display my webview, the problem here is I dont understand how can I implement the onBackPressed scenario you did here?
I know that is an activity method not a fragment method
Tq bro very much
I was trying for last 2days here i get what i need
Awesome work bro
Dear, thank you for the video. I'm trying to open https://www.desco.org.bd/ebill/login.php in the webview, but appear a blank page. I believe that it is because of the pop-up. I enable javascript and tried WebChromeClient but don't work either. Help me to see the page, please.
Thank you! A very helpful video!
Pretty Clean and simple, superb. Thanks for this usefull video.
I don't usually leave comments, but this video is TOP-NOTCH.
Hello. Thanks for your video. Does this work on Android Wear 1.5? I am getting an error, the app crashes when loading the webview component.
You are awesome!!! Your voice is soothing too, you're a natural teacher.
great work
PLEASE HELP ME SIR,
Hi sir, I'm doing a webview application. I have a problem: "Adsense ads appear when using Chrome custom tabs, but adsense ads don't appear when using regular webview."
In normal webview, how are ads allowed?
Example image: https://goo.gl/HSCxyz