WebView in Android Studio

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • Master programming and take your career to new heights with clear, concise C, Android, and Web Development courses for just Rs. 999 / $ 12. Get lifetime access and certificate. Click here to enroll: courses.sandip...
    In this video, I'll show you how to load a website in your Android app without using any web browser and using only WebView class. So, let's get started.
    Source Code for this video
    github.com/san...
    Check out my other videos on WebView here:
    Load Local HTML Files Into WebView | Android Studio Tutorial
    • Load Local HTML Files ...
    Build a Web Browser in Android Studio
    • Build a Web Browser in...
    | -------------------------------------------------------------------- |
    👍 Subscribe to the Channel
    www.youtube.co...
    Check out other Playlists
    ► Introduction to Programming with C (2 hours of video content)
    • C Programming Tutorial...
    ► Android App Development for Beginners (8+ hours of video content)
    • Android Apps and Games...
    ► Build a Complete Quiz App for Android
    • Build a Complete Quiz ...
    ► Android SQLite Programming for Beginners (2.5 hours of video content)
    • Android SQLite Program...
    ► Android Game Development in Android Studio: Build Games for Absolute Beginners (3+ hours of video content)
    • Android Game Developme...
    ► Android Game Development - Create Your First Mobile Game
    • Android Game Developme...
    ► Android Game Development Tutorial
    • Android Game Developme...
    ► Programming Flappy Bird for Android
    • Programming Flappy Bir...
    ► Object Oriented Programming Fundamentals
    • Object Oriented Progra...
    ► jQuery for Beginner to Advanced
    • jQuery for Beginner to...
    ► PHP MySQL CRUD Tutorial (Create, Read, Update, Delete) (1+ hour of video content)
    • PHP MySQL CRUD Tutoria...
    ❤️ You can donate by clicking here
    PayPal: paypal.me/Crea...
    For Indians: www.instamojo....
    ✉️ For Business Inquiries
    sandip.bhattacharya16@gmail.com
    📣 Follow me on other sites
    → Website: SandipBhattach...
    → Udemy: bit.ly/SandipUdemy
    → Skillshare: bit.ly/SandipSk...
    → Google Play: bit.ly/SandipPlay
    → Facebook Page: bit.ly/SandipFa...
    → Facebook Group: bit.ly/PWSGroup
    → LinkedIn Group: bit.ly/PWSGroupLI
    → Twitter: bit.ly/SandipTw...
    → GitHub: bit.ly/SandipGi...

Комментарии • 236

  • @SandipBhattacharya
    @SandipBhattacharya  Год назад +1

    Master programming and take your career to new heights with clear, concise C, Android, and Web Development courses for just Rs. 999 / $ 12. Get lifetime access and certificate. Click here to enroll: courses.sandipbhattacharya.com/s/store

    • @thebiguniverse9926
      @thebiguniverse9926 9 месяцев назад

      hello
      Please am working on webview
      This is what am trying to achieve
      When I load a website in webview I want every link clicked on the website should not open in webview but it should open in default browser

    • @thebiguniverse9926
      @thebiguniverse9926 9 месяцев назад

      Pls tutorial

  • @mariussebastian8467
    @mariussebastian8467 2 года назад +3

    This is very efficient as you can code the rest on the web, and that's much more easier than coding in Java/Kotlin. Thanks for the tutorial.

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад +1

      You are welcome! 🙂
      Check out my other videos on WebView here:
      Load Local HTML Files Into WebView | Android Studio Tutorial
      ruclips.net/video/UTbXeBNIAwI/видео.html
      Build a Web Browser in Android Studio
      ruclips.net/video/011C96GCLjU/видео.html

  • @gotterdammerung1837
    @gotterdammerung1837 3 года назад +2

    very helpful tutorial, it save my internship for now, ty

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      You are welcome. Keep learning. All the best for your career.

  • @dmkhiladi
    @dmkhiladi Год назад +2

    To make your custom app -
    Step -1 Make a web page
    Step-2 Link your web from android studio as shown in the video
    Step-3 DONNNNNE!!!

  • @michaeloyegbola8387
    @michaeloyegbola8387 3 года назад +2

    Thank you. This video tutorial is so helpful and the approach is very simple.

  • @AymanShaabanELsayedDEVELOPER
    @AymanShaabanELsayedDEVELOPER 4 года назад +4

    Hi thanks for your perfect video,
    I have problem ,i pass short RUclips link to an webview ,the video sometimes work perfect and sometimes the video image cuts off but the sound work perfect,please help me

  • @OpCoders
    @OpCoders 3 года назад +2

    Thanks Very very thanks to you, you are supereb

  • @DaveLott
    @DaveLott 3 года назад +2

    Thank you, Sandip! Good show.

  • @RussellHampton1
    @RussellHampton1 9 месяцев назад +1

    Thanks Sandip, it works beautifully. Can you help with another aspect which allows my app to fully interact with my device in that I need it to access the device's gallery in order to post images as it works similar to other social media websites.

    • @SandipBhattacharya
      @SandipBhattacharya  9 месяцев назад

      Hi Russell, thank you for your feedback. I have noted your request and will strive to provide a solution as soon as possible.

  • @servantofallah6734
    @servantofallah6734 3 года назад +3

    Great Work man❤️ i am facing problem.
    Aftet creating the app i open it and i am go to my about section from my web homepage, and when i click back button it was backed to mobile home screen, it should redirect to my web homepage,
    Please solve this.....

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Thanks. Let me check

    • @diegodelgadillo8919
      @diegodelgadillo8919 3 года назад

      @@SandipBhattacharya What was the fix?

    • @codexrat
      @codexrat 3 года назад +1

      Add this inside main class :-
      @Override
      public void onBackPressed() {
      if(webview.canGoBack()) webview.goBack();
      else super.onBackPressed();
      }
      enjoy!!!

    • @servantofallah6734
      @servantofallah6734 3 года назад

      @@codexrat thanks

  • @dmkhiladi
    @dmkhiladi Год назад +1

    Thank you sooooooooo! Much!

  • @filipigaming4789
    @filipigaming4789 2 года назад +1

    Thank you a very helpful video

  • @SouravKumarKar_MKGT
    @SouravKumarKar_MKGT 3 года назад +1

    Good Job. I Like you tutorial very much. keep it up.

  • @ArchiwumTajemnic
    @ArchiwumTajemnic 3 года назад +3

    Hi, first of all thanks for the tutorial, everything was understandable and clear :). However, the input file does not work on the page, how can I solve this? :((

  • @akashchatterjee4746
    @akashchatterjee4746 4 года назад +3

    Sir thank you for the video but i had a problem while making the webview app which was the menu bar of my website was not working in the webview app

    • @tusharniras
      @tusharniras 3 года назад

      Check javascript Permission

  • @chanukajayamal8841
    @chanukajayamal8841 2 года назад +1

    Thank you. Keep doing good work.

  • @biotechwithbeast7739
    @biotechwithbeast7739 8 месяцев назад +1

    Thank you 😊

  • @tuanphamvan655
    @tuanphamvan655 3 года назад +1

    It is great looking forward to adding more videos

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад +1

      Thank you so much. More to come!

    • @tuanphamvan655
      @tuanphamvan655 3 года назад

      Besides knowledge of android java, do you have any course on php mvc mysqli ?

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Check out my playlist "PHP MySQL CRUD Tutorial (Create, Read, Update, Delete)" : ruclips.net/p/PLGY_UftsHsIaIcSLmDNiWlA2ZRUEiwBc4

  • @MdAzad-xy2kj
    @MdAzad-xy2kj Год назад +1

    Thanks

  • @jehdeiahgreen3644
    @jehdeiahgreen3644 3 года назад +1

    Please I need a help.
    I have a web_loader activity.
    I created a different class and call it WebViewsetting.java class.
    I extends it with activity..
    Then I put some webview setting codes in apply a method call apply_setting
    But when I call the method in the loader activity, my app keeps crashing.. please I need help.
    Please what should I do?

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Check your Logcat and get the exact error message. Copy that and paste in Google.

  • @Manusakibolbe
    @Manusakibolbe 2 года назад +1

    Thanks for video

  • @user-pk1me7ds4j
    @user-pk1me7ds4j 5 месяцев назад +1

    Thank you

  • @Barganix
    @Barganix 3 года назад +1

    Sir Please Solve My Issue, Maine Ek Whatsapp Status Web App Banaya Tha Android Studio Ke Madat Se Par Usme Mera Video Download Nahi Ho Raha Hai, Aisa Kya Kare Jisse Video Download Ho Sake Phone Me App Ke Jariye. Please Help Me

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад +1

      Hi @2 Brothers Status, you can create download request using DownloadManager.Request. Then get the download service and the actual video file from link using DownloadManager class.

  • @kennethverhoeven3972
    @kennethverhoeven3972 2 года назад +1

    i dont know how but somehow the "shouldOverrideKeyEvent" stuff fixed my blurry images, thanks for the tutorial helped me really good

  • @ImARBOY
    @ImARBOY 3 года назад +1

    One question from me...
    I have made story app using recycler view.
    And on string.xml i have added title_story and detail_story.
    And when user click on title_story it should show html text insted of java text view..
    Because i dont want to write detail story in text in string.xml.
    I want that write that detail story on html webview.
    Plz plz helo help..🙏🙏🙏

  • @fasilputhiyodath2471
    @fasilputhiyodath2471 3 года назад +1

    Thanks for your valuable time

  • @ayshahamna2466
    @ayshahamna2466 3 года назад +1

    Thank you! It helped me a lot

  • @ericgarcia1912
    @ericgarcia1912 2 года назад +1

    Great 👍 tutorial, can you please make one with button that links to webpage.

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад +1

      Hi Eric, glad you liked my tutorial. I'll create a separate video on that soon. Meanwhile, what you can do is, add an EditText and a Button just on top of the WebView. When the Button is clicked, get the url from EditText and pass the String in loadUrl() parameter. Done! 🙂

  • @gascadre
    @gascadre Год назад +1

    Good Video. You have explained very well. I have followed all steps. But, showing error as :
    err_cache_miss
    Please help to solve the problem.

    • @SandipBhattacharya
      @SandipBhattacharya  Год назад

      Thank you so much. Check if is present in manifest.xml. Make sure that it is nested under and not . If you still have this issue, make sure that your Android Studio, Android SDK and the emulator image (if you are using one) is updated.

    • @gascadre
      @gascadre Год назад +1

      @@SandipBhattacharya Yes. Thanks. I have copied your code from github and problem is solved. Thanks 🙏

    • @SandipBhattacharya
      @SandipBhattacharya  Год назад

      You are welcome. 🙂

  • @futurebae5524
    @futurebae5524 Год назад +1

    thank you

  • @omkarnavle6820
    @omkarnavle6820 3 года назад +1

    and I get 'emulator: dsound: attempt to initialize voice without directsoundcapture object' error

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад

      Try this: If you're using Windows 10, go to Start > Settings> Privacy Settings> Microphone. Turn on "Allow apps to access your microphone" if it's turned off.

  • @LVLFITFACTORY
    @LVLFITFACTORY 3 года назад +2

    Nice work man ! I have and error and the end. Maybe is because I work in mac

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Thanks a lot man. I wish I could help you in this regard, but I use windows Pc.

  • @vincesanityyy
    @vincesanityyy 3 года назад +1

    I got an single page application website but in my webview i cannot proceed to next url. Is that because my web is SPA? pls tell me

  • @Mukesh-qt5vu
    @Mukesh-qt5vu 3 года назад +1

    How can I download it and upload it on play Store

  • @FarhanAhmed1360
    @FarhanAhmed1360 3 года назад +1

    Great tutorial. Thanks

  • @Rafael-hk9pg
    @Rafael-hk9pg 3 года назад +1

    How to disable the refresh from the webview? I am running into "too many requests coming from your IP" messages

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Hi, try this by adding android:launchMode="singleInstance" to your element in manifest

  • @sanketmahalle6866
    @sanketmahalle6866 3 года назад +1

    Great work it helps me a lot
    But how to display website notifications as app notifications android studio webview

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад +1

      Thanks! Let me check.

    • @sanketmahalle6866
      @sanketmahalle6866 3 года назад

      @@SandipBhattacharya please check it and rply me its helps me to comple my webview

  • @nathancook8452
    @nathancook8452 3 года назад +1

    thanks it worked!

  • @Mediaspotstudiokottayam
    @Mediaspotstudiokottayam 3 года назад +1

    Thank you very much,,, can you please help me for a a topic that which i wish to create a woo-commerce website, im trying to follow your method of web view . but i want a notification on mobile while a customer purchase product from my website . can you please help ?

  • @oswaldovillaperez7266
    @oswaldovillaperez7266 3 года назад +1

    Thanks!

  • @ElianasJourney
    @ElianasJourney Год назад +1

    i think the http should be https?

  • @technofreaks3808
    @technofreaks3808 2 года назад

    Getting web page not found err error for external links to open follow up page like fb n insta

  • @norush5832
    @norush5832 3 года назад +1

    Thank you very much

  • @albertissac
    @albertissac 3 года назад +1

    Dear Sandeep, thanks for your video, I have a question if you can bring some light on this issue, I create a website to be used specially for android devices, and I want to include videos on it to be viewed from android devices, I use HTML video frame to add it and it run nice on all devices and also on PC, but I found a issue, when I view the video from any android device it don't allow to advance or go back in the video time, and it only run on normal speed mode without allow to advance forward or go back on video control, even when you try to double tap on screen what it does is go back to the very beginning of the video over and over, please if you have any clue how to fix this issue please let me know, thanks in advance

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Try this line of code:
      webView.getSettings().setDomStorageEnabled(true);

  • @prithagroup
    @prithagroup 3 года назад +1

    good profesion

  • @noxtorious2962
    @noxtorious2962 2 года назад +1

    thanks bro

  • @codingcodes4035
    @codingcodes4035 3 года назад

    Thanks a lot very helpful!!

  • @abhisheksinghchauhan4917
    @abhisheksinghchauhan4917 2 года назад +1

    I got an error null pointer exception

  • @mohammedhussenbavani9324
    @mohammedhussenbavani9324 2 года назад

    Sir in this app payment gatway can't work please give any suggestion for this problem.

  • @tarunk9796
    @tarunk9796 Год назад +1

    Hey man, can i just know if a full scale web app, with a whole lot of features still be efficient to load and interact using web view ?
    consider something like a cred app running within the webview
    thanks in advance, you earned a sub :")

  • @7coral470
    @7coral470 7 месяцев назад +1

    Forbidden error coming in my webview need help

    • @SandipBhattacharya
      @SandipBhattacharya  7 месяцев назад

      Hello, a 'Forbidden' error in WebView usually indicates a permissions issue. First, ensure the URL is correct and accessible. Then, check if your app has the necessary internet permissions in the AndroidManifest.xml file by adding . If it's a secured website, ensure proper handling of SSL certificates. If the issue persists, it might be related to the website's server configuration, which can block WebView user-agents.

  • @JeSuisMikesh
    @JeSuisMikesh 3 года назад +1

    hi! awesome video . I'd learned more in this video than in class. i have a question,
    im developing a website that uses whatsapp link buttons, so, how can i make that this webview automatically detects the instaled whatsapp and open the whatsapp chat in the app? (whatsapp app)
    i mean, switch beetwen the webview and whatsapp when a whatsapp link is clicked

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад +1

      Thanks!
      You can either use:
      Share
      or, use
      Share
      in the HTML.
      If that's not working then update android version and whatsapp version of your phone.

    • @JeSuisMikesh
      @JeSuisMikesh 3 года назад +1

      @@SandipBhattacharya thank you so much!

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      @@JeSuisMikesh You are welcome. 🙂

    • @JeSuisMikesh
      @JeSuisMikesh 3 года назад

      @@SandipBhattacharya me again 🤦🏻‍♀️ I get an error that says "net::ERR_UNKNOWN_URL_SCHEME" how can I fix it?

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      1) Try to add target="_blank" in your code.
      For Example:
      Share
      or, use
      Share
      2) Try using http instead of https.

  • @Geceparlayan
    @Geceparlayan 3 года назад +2

    Can any one please share the code????

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Hi @FTF Studio, send me a query through my website: sandipbhattacharya.com/contact.php

  • @montezmusic
    @montezmusic 2 года назад +1

    Sir how to remove default app nav bar

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад +1

      @Montez Music, This is one way to make your app fullscreen (and remove default app nav bar).
      Click here: ruclips.net/video/f2oSRBwN2HY/видео.html

    • @montezmusic
      @montezmusic 2 года назад +1

      @@SandipBhattacharya thank you sir

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад

      You are most welcome. 😊

  • @prashantvishwakarma5260
    @prashantvishwakarma5260 3 года назад +3

    Thanks bro that permitted error was irritating me, there was no solution in the web leaving your video thanks

  • @ActressandModels
    @ActressandModels 3 года назад

    Ty for so much its really work

  • @BlessingBUDDHA
    @BlessingBUDDHA 2 года назад

    I have a question please help me..!
    ...
    💕🙏 Thank you so much for this informative tutorial 💐
    Amazing and easy explanation...
    Dear sir,
    I have some external links in buttons (another website) on my website.
    When I try to open those links, an error shows = You need to enable JavaScript to run this app/Invalid product...
    I want those links to open in Chrome or any default web browser.
    What I need to do?
    Please help 🤗
    Thanks 💐

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад +1

      Most welcome 😊
      Just follow the instructions.
      Step 1: In shouldOverrideUrlLoading() method, write
      if (url.equalsIgnoreCase("sandipBhattacharya.com/contact.php") || url.equalsIgnoreCase("sandipbhattacharya.com/contact.php")) {
      view.getContext().startActivity(
      new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
      return true;
      } else{
      return false;
      }
      Considering, I want to open contact.php page in browser.
      Step 2: Just replace my links with your external links.
      I have tried this code to be working fine. Hope that helps you!

  • @meherunnisa3025
    @meherunnisa3025 3 года назад +1

    Back in page does not work

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      @Meherun Nisa, override onBackPressed() like the following in MainActivity:
      @Override
      public void onBackPressed() {
      if (web.canGoBack()) {
      web.goBack();
      } else {
      super.onBackPressed();
      }
      }
      Hope that helps. 🙂

  • @SMK-X
    @SMK-X 3 года назад

    Brother, I have a problem with the application showing my site, but it is not connected, the Internet!

  • @netherlands101
    @netherlands101 3 года назад

    Thanks for the video, it helped me a lot.
    I have a question, how do I enable the gps for a website used by my webview? Thank you

  • @bishalchatterjee8184
    @bishalchatterjee8184 2 года назад

    I am not being able to use keyboard inside my webview it crashes my fragment everytime

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад

      I don't know about your code. But, it works fine without using fragment.

  • @omkarnavle6820
    @omkarnavle6820 3 года назад

    Hi sandip sir,these tutorial is very nice .but which version you used in these tutorial of Android Studio. plz reply ASAP.

  • @powerblaze2u
    @powerblaze2u 3 года назад

    When I click on sign in on my WebView it prompts for a browser. Same thing if the view is to open a new tab. It prompts for browser. How do I prevent this?

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Hi felix, try "return true" instead of "return false" in shouldOverrideKeyEvent() method.

  • @DarleydeCarvalho
    @DarleydeCarvalho 3 года назад +1

    Hi, do you know how can I fix the error: (net::ERR_HTTP_RESPONSE_CODE_FAILURE )? I have a login pege, but after the login I'm having this error. Thank you for your video.

    • @DarleydeCarvalho
      @DarleydeCarvalho 3 года назад +1

      hello, I already fixed my problem. I was actually trying to log in, but I was already logged in. thank you so much.

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад +1

      Glad to hear that you were able to fix it. Congratulations!

  • @moonloud9109
    @moonloud9109 2 года назад

    Hi Sandip,
    is there any tips if we want to inject our js file inside webview which the website is not ours?
    So it will be same as common browser extension.
    Thank you.

  • @rickymicky272
    @rickymicky272 2 года назад

    Thanks very helpful.

  • @garrycz3184
    @garrycz3184 2 года назад +1

    thx bro

  • @sudhirbehera
    @sudhirbehera 2 года назад +1

    My see a Blank page. can you tell how to fix?

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад

      Hi, select onCreate() that takes only one Bundle argument. For example,
      @Override
      protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      .
      .
      .
      }
      Try this and hope your issue will be fixed.

    • @thejeepwranglerguy9543
      @thejeepwranglerguy9543 2 года назад +1

      @@SandipBhattacharya thanks . One more issue CSRF token not generated for post method to backend DJANGO server. It works fine on the browser but not from Android Apo

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад

      @@thejeepwranglerguy9543 Not of my knowledge.

  • @celeb-news
    @celeb-news 2 года назад

    When you press back it closes the app. How do I fix that?

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад +1

      Override onBackPressed() like this:
      ruclips.net/video/011C96GCLjU/видео.html

  • @pbhanuprakash9832
    @pbhanuprakash9832 3 года назад +1

    How to hide top title bar?

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад +1

      Hi Patoori, this is one way to make the app fullscreen and hide the top title bar. 🙂
      ruclips.net/video/ZaoVQYbhuKI/видео.html

    • @pbhanuprakash9832
      @pbhanuprakash9832 3 года назад +1

      Thank you so much for your reply with approporiate solution and timestamp@@SandipBhattacharya great to see such dedication

  • @NAVEEN-pz3fg
    @NAVEEN-pz3fg 3 года назад +1

    Tell me how can I add upload file and download file on webview app

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      If the website has upload and download feature, it may be possible using webview app. Try that. 👍

    • @NAVEEN-pz3fg
      @NAVEEN-pz3fg 3 года назад

      @@SandipBhattacharya yes my website has upload option. but the problem is whenevr a user click on upload or download button in the app inothing happens.

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Ok. I'll have a look into it and let you know.

    • @StudentSekhar
      @StudentSekhar 3 года назад

      @@NAVEEN-pz3fg use permissions.

  • @pavittarkumarazad3259
    @pavittarkumarazad3259 3 года назад

    This video saved me

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Thanks for your kind words, Pavittar. Check this playlist for more cool videos on android app development.
      ruclips.net/p/PLGY_UftsHsIa-7gHJj_8NzVUb5MPizGg-

  • @rideforworld
    @rideforworld 3 года назад +1

    How can I open my url like this after click a button

  • @chandra9441
    @chandra9441 3 года назад

    For source code means, agar developer nahi dhiyetho.. aap ko pochsakte?

  • @supriya2013
    @supriya2013 Год назад

    How to add a video into this web app ?

  • @imranakram2969
    @imranakram2969 3 года назад

    Hi Your Support Webview Apps I created successful..But I have a login page in my website I am trying to login in login page with android webview app..Use correct id password then unable to login and in other browser with same login page I am able to login with same credentials.. Please help on it... Thank you so much..

  • @toCatchAnAI
    @toCatchAnAI 3 года назад +1

    how do you remove the blue header above?

    • @toCatchAnAI
      @toCatchAnAI 3 года назад +1

      amazing tutorial btw!! just subbed!

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад +1

      Thanks for subscribing.
      Try this if you want to remove the ActionBar:
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      getSupportActionBar().hide();
      Call these before setContentView()

  • @erica-rainbow3201
    @erica-rainbow3201 Год назад

    Hi!
    I did the app, seems like is running fine in the app, but please tell me how do I save it and share it to others? Thanks!

    • @SandipBhattacharya
      @SandipBhattacharya  Год назад

      You can either publish it on Google Play or generate an Apk and share that Apk with others.

  • @user-pk1me7ds4j
    @user-pk1me7ds4j 5 месяцев назад +1

    Android system link

  • @Ddewzxdsszkbooj100
    @Ddewzxdsszkbooj100 2 года назад

    hello how i can made the apk archive

  • @amitkumarpandey963
    @amitkumarpandey963 2 года назад

    My webview app search my mobile contact list ?

  • @kalashalthetalenthub6282
    @kalashalthetalenthub6282 3 года назад

    Its running perfectly but i added some Google forms link button in my website, its running through website smoothly but in app its showing ERR_UNKNOWN_URL_SCHEME
    How can i fix that.

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Try using the full link. Uncheck the "Shorten URL" checkbox if it's checked, to get the full link.

    • @kalashalthetalenthub6282
      @kalashalthetalenthub6282 3 года назад

      @@SandipBhattacharya its full link but not opening in app

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      @@kalashalthetalenthub6282 Hey, here is the solution!!!
      Sometimes the WebView can't deal with special URL scheme other than http or https, for example intent://, app://, tel:, mailto:, whatsapp:// etc. So, we are required to override shouldOverrideUrlLoading method in the custom WebViewClient class that we created, called Callback, and handle these schemes or to disable these schemes. The solution that works in your case is given below. You can add or remove few if blocks if you need to. Enjoy!
      public boolean shouldOverrideUrlLoading(WebView view, String url) {
      if (url.startsWith("http") || url.startsWith("https")) {
      return false;
      }
      if (url.startsWith("intent")) {
      try {
      Intent intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
      String fallbackUrl = intent.getStringExtra("browser_fallback_url");
      if (fallbackUrl != null) {
      view.loadUrl(fallbackUrl);
      return true;
      }
      } catch (URISyntaxException e) {
      // Syntax problem with uri
      }
      }
      if (url.startsWith("tel:")) {
      Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(url));
      startActivity(intent);
      } else if (url.startsWith("mailto:")) {
      Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(url));
      startActivity(intent);
      }
      return true;// do nothing in other cases
      }

    • @kalashalthetalenthub6282
      @kalashalthetalenthub6282 3 года назад +1

      @@SandipBhattacharya ya its working now. Tysm for your help 😇

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      Thanks for the feedback. Keep learning, always! 🙂

  • @akshaygangwani9875
    @akshaygangwani9875 3 года назад

    Thank you! but can we play video sound in lockscreen ?

    • @SandipBhattacharya
      @SandipBhattacharya  2 года назад +1

      No, it's not possible. Lock screen video and sound is not provided by any manufacturer till date.

  • @vinaybakle6443
    @vinaybakle6443 3 года назад

    Does it plays video and audio of websites also? I have test couple of webviews seems it doesn't works

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад

      You can try this:
      Step 1: Add internet permission in Manifest
      Step 2 : Add this to your Manifest file in application tag
      android:hardwareAccelerated="true"
      Step 3: Add your network security config file in application tag of Manifest
      android:networkSecurityConfig="@xml/network_security_config"
      Step 4 : Check if you are setting layer for your WebView.
      For example, myWebView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
      Step 5: To unblock mixed content use in your Java class:
      For example, webView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);

  • @vefamedia3373
    @vefamedia3373 2 года назад +2

    Sen süpersin ya

  • @salaheddinekhaloui9768
    @salaheddinekhaloui9768 2 года назад

    My app doesn't work error
    can you help me

  • @user-pk1me7ds4j
    @user-pk1me7ds4j 5 месяцев назад +1

    Android system link web broswer

    • @SandipBhattacharya
      @SandipBhattacharya  5 месяцев назад

      From onCreate() write:
      web.loadUrl("SandipBhattacharya.com/contact.php");
      Inside Callback class put this overridden method:
      public boolean shouldOverrideUrlLoading(WebView view, String url) {
      /* Open some links (it can be external links also) on Chrome
      or any default web browser.
      For example: following code will open contact.php
      in Chrome or any default web browser of your mobile.
      */
      if (url != null && (url.startsWith("") || url.startsWith(""))) {
      view.getContext().startActivity(
      new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
      return true;
      } else{
      return false;
      }
      }
      Hope it helps. 🙂

  • @johnhendrixgallana1877
    @johnhendrixgallana1877 Год назад

    hi can i ask , how to connect localhost wordpress website from android studio like Webview thanks.

    • @SandipBhattacharya
      @SandipBhattacharya  Год назад

      If you're using Android Studio to run the emulator, then localhost of your host computer will be mapped to the IP address, 10.0.2.2, inside the emulator.

  • @rijorajan3090
    @rijorajan3090 3 года назад

    In andriod studio 4.1.1 version on layout folder I can see 4 xml files, activity_main,content_main,fragment_first,fragment_second .I am a react developer(fresher) so i dont know where to add webview activity_main code have different that I can see your activity_main.xml

  • @rehanbabu1456
    @rehanbabu1456 Год назад

    I want to publish the app in Play Store can we upload

  • @ArielsonSilva
    @ArielsonSilva 2 года назад

    nice

  • @jhonatansantofimio3764
    @jhonatansantofimio3764 2 года назад

    to me say : err-name-not-resolved

  • @sharonbabu9016
    @sharonbabu9016 3 года назад

    How the website set as responsive in mobile app

    • @SandipBhattacharya
      @SandipBhattacharya  3 года назад +1

      Your website itself should be responsive.

    • @sharonbabu9016
      @sharonbabu9016 2 года назад

      @@SandipBhattacharya All online applications are using this technique webview for their online apps?

  • @mohitgohel4671
    @mohitgohel4671 2 года назад

    how to desktop site opn this app?

  • @alexnelsed1528
    @alexnelsed1528 3 года назад +1

    me arreglo 4 horas de trabajo agradecido con el de arriva

  • @ravindrakumaryadav9739
    @ravindrakumaryadav9739 3 года назад

    no error but app crashes

  • @peace9266
    @peace9266 3 года назад

    My app doesn't work error

  • @littleprogrammer9446
    @littleprogrammer9446 3 года назад

    Peace be upon you, I would like to communicate with you, as I want to do such a video, but in the name of my educational academy, it is really a beginner, but we have a primary goal is to teach programming to our children, so I see that you are the right person, especially if you referred to our Junior Programmer Academy. This video will give us a great opportunity to be in the market, I hope you send me the cost and approval to format the video content even if it is short

  • @avijitsamanta8784
    @avijitsamanta8784 4 года назад

    Sir make a project on file sharing using wifi p2p

  • @hasantalukder2981
    @hasantalukder2981 4 года назад

    Sir make video with json object