Build a Weather App in Android Studio | Volley Library | OpenWeatherMap API

Поделиться
HTML-код
  • Опубликовано: 22 окт 2024

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

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

    Thank you so much.This video REALLY helped me in my career at the university

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

    Thank you sir, for this video i have successfully completed the project, though i got some error but some errors where already taken in the comment section and some i solved by myself and the app is working great 🔥 thanks again sir ✌️.

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

    StringRequest.... How did you implement it, did you import Class from the Volley... Because when I try it's not recognizing the dependencies, I synced the Gradle after adding a the dependencies but it's still not working.

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

      Have you tried the source code I provided with this video? Check the video description.

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

    i can't call the API because now on openweather, they use lat and lon (in your video, you can use city name). can you help me with that (i want to use city name too)?

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

      Yes, they've changed their API, removed city as a parameter, instead using lat and lon for a city/location's weather. In that case, use their *Geocoding API* to pass city name, get JSON response, parse JSON as shown in this tutorial to get lat/lon, and use their Weather API to get weather details. It's a straightforward process and similar to what I demonstrated in this video. Check this link for more details on their Geocoding API:
      openweathermap.org/api/geocoding-api
      Hope it helped!

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

      thank you!

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

    Thank you so much. Really helped me in my career at the university with this video.

  • @sgamingyt5407
    @sgamingyt5407 4 месяца назад +1

    Thank You So much Very Hepfull

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

    I have made the app as you showed but it's not opening...it's showing Android with a black background..
    Can you tell me the reason?

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

      Make sure you wrote the following onCreate() method that is taking only one Bundle argument:
      @Override
      protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      .
      .
      .
      }
      If you are still stuck, download the source code (link in description) and check with yours. Good luck!

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

    Thank you very much sir, this tutorial helped in understanding the application development in easiest way

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

      Glad it helped. Keep learning, keep coding. All the best.

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

      Sir , would you please tell me how to extend the code for. 5days whether forecast,,

  • @immonabeer902
    @immonabeer902 11 месяцев назад +1

    Sir my app give wrong information there's no bug shows in the project. but false result shows how to fix it?

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

      Pls go through my answer to ssmo's question in the comments section.

  • @jk-sg2gc
    @jk-sg2gc 2 года назад +2

    Good day, Sir! I would like to thank you for this video tutorial. This video help me a lot on my project. I really appreciate your effort in making this video. ❣️

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

      Glad to know it helped in your project. Keep learning, all the best. 🙂

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

    Hi sir, are you using any security related concept?

  • @DeepCoderMK
    @DeepCoderMK 4 месяца назад +1

    It works, thank you very much for video.

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

    What is meant by string url ? Can we generate it or not?

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

      It's just a String used to store the URL to hit. For this particular app, you can generate it as shown in the tutorial.

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

    Finally my project work thanks a lot sir 😌

  • @sithusoe8797
    @sithusoe8797 11 месяцев назад +1

    Thanks a lot and this helps me in my coursework

    • @SandipBhattacharya
      @SandipBhattacharya  11 месяцев назад +1

      Happy to help! Best of luck with your coursework. 😊

  • @siddharthchalke3378
    @siddharthchalke3378 11 месяцев назад

    What did you do for String request

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

    1:11 sir, why all tutorial use LinearLayout instead of ConstraintLayout?

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

    Thanks a lot..but my scrolling isn't working..i completed the whole project...but page isn't scrolling..can u please help

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

    Thanks advance. i used your code and it can show data using Toast. but I want to save to my own created class object name weather.but it's not working. how can I solve it?

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

      Hello, one solution is, you can serialize your weather object and write directly into a file using FileOutputStream and ObjectOutputStream and when required you can use FileInputStream and ObjectInputStream to read object.
      Hope it helps to guide you in the right direction.

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

    @sandip Bhattacharya we need that image what you selected

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

    Hlo pls reply sir actually mere pass getweatherdetails m error arha h agr m alt+enter krti hu to create method ka option nhi arar what i can do?

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

      Hi Simran, clean and rebuild the project.
      You can also manually create the method in your Activity class.

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

      @@SandipBhattacharya ok solve hogya

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

    Hi sir, am getting the following error on my mobile device "com.android.volley.AuthFailureError" How do I fix this?

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

      Get your OpenWeatherMap API Key and use that.

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

      Am getting an error "cannot resolve symbol StringRequest" when I press on import com.android.volley class it say cannot resolve symbol 'volley'...

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

      @@UpVerse7 make sure you open the right build.gradle file, since there are 2, you need to pick the 2nd one.

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

      how did u solve this i am getting com.android,volley.ClientError please help

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

    Hello good man, I have done this on my computer but here is what happened:
    StringRequest is all in red, after i Alt+Enter then Request and Response are both red. How do i fix this??

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

      Actually, i fixed this, but now my aplication is crashing

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

      Somthing to do with security config or something

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

      Hi Mihael, download the source code from video description and match with yours.

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

    Hello, how can we put weather icons?

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

    Sir when i run the project by just weite kolkata before json viewer then my logcat to gives the response

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

    Does anyone know a code for displaying the weather for the week?

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

      Check OpenWeatherMap's 5 day weather forecast documentation. Link in video description.

  • @a.t.y7
    @a.t.y7 Год назад +1

    can you send me thee link of the background picture?

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

      I appreciate your interest in the background picture! Feel free to explore stock photo websites for similar images that may meet your requirements. If you have any other questions, please don't hesitate to send an inquiry via my website.

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

    Hi
    If I want to create registration and login activities using firebase before creating the activity of the weather am I supposed to have a problem?

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

    THANK YOU SIR

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

    How and where to download network security config file?

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

      Download the full source code from video description. Inside app > src > main > res > xml folder you'll find the network_security_config.xml file.
      Hope that helps!

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

    Smooth tutorial, well explained.. Thank you very much for the tutorial...

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

    please guide how to download code from GitHub and run the code in android studio without errors

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

    Thank you very much!
    I'm having trouble with the error though.
    at tvResult.setTextColor

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

    GREAT VIDEO! also you have very interesting content in your chanel, just suscribed. Awesome!!

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

      Hi Paolo, thanks for your kind words and sincere thanks for subscribing.

  • @ManishPandey-kv8os
    @ManishPandey-kv8os 2 года назад

    Sir were is network_security_confi.xml...... And how you made.... Please help I'm stuck in problm

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

      Hi Manish, download the source code, there you'll find the network_security_config.xml file. Check the GitHub link in description.

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

    Thank you sir, works super fine

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

    app is not starting , what must be the problem ??

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

      Start over watching the video again. Also, check your Logcat statements for any errors.

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

      @@SandipBhattacharya i just copied from source code and the app is not opening.... Thanks for fast reply

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

      @@omsuryawanshi5478 Ok. Check Logcat for errors. This is the first thing we should check once we get an issue.

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

      @@SandipBhattacharya there are so many lines in RED . not able to understand what to do
      and i can u please confirm that it is not becoz of that api and url thing

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

      @@omsuryawanshi5478 Make sure you have the latest version of Android Studio, gradle and Android SDK. Then, clean the project and see if the issue is resolved.

  • @sifoi-shitifoundoninternet6838
    @sifoi-shitifoundoninternet6838 2 года назад

    error
    Can't determine type for tag ''

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

      It's working with
      Alternatively, you can use this inside the opening application tag:
      android:networkSecurityConfig="@xml/network_security_config"
      This is the content of network_security_config.xml file under res\xml:

    • @sifoi-shitifoundoninternet6838
      @sifoi-shitifoundoninternet6838 2 года назад +1

      @@SandipBhattacharya sure thanks mate

  • @__-pd7tc
    @__-pd7tc 2 года назад +1

    Thank you, sir

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

    Sir i made this app according to your tutorial but i dont get result when i click on get

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

      What error you're getting? Check your Logcat statements and google with that. I hope you'll find a solution.

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

    i have copied the code as it is but still it is showing runtime exception because of that application is not opening

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

      Watch the video and follow the instructions carefully. It will run.

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

      After Importing the source code from git
      -update the build.gradle for the weather.app module. (Lines that need updating will be highlighted, hover over them and alt shift enter them.
      -Build and then make project
      -File. sync project with grade files.
      -File Reload all from disk
      Should work then enjoy!

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

    How to download source code from the given link please help

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

      Click the link > Code > Download ZIP.

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

      @@SandipBhattacharya but there is no download zip option after > Code

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

      Showing archive is corrupt

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

      Once you click on the link, you will be redirected to github(dot)com/sandipapps/Weather-Update. There you can see the green "Code" button. If you click on that button, you'll be given option "Download ZIP". The ZIP file is not corrupt, I have verified that.

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

      @@SandipBhattacharya sir, can you tell us what to do after we download the file as a zip? how long does it take us to completely install the application after downloading the zip file

  • @a.t.y7
    @a.t.y7 Год назад

    Can you tell me about network security config file, like from where we can get it?

  • @abhishekl.h7621
    @abhishekl.h7621 2 года назад

    How to remove Google adds?

  • @ИванИванов-п1з5у
    @ИванИванов-п1з5у 3 года назад

    Why does the application crash if you enter it incorrectly?

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

      What do you enter it with?

    • @ИванИванов-п1з5у
      @ИванИванов-п1з5у 3 года назад

      @@SandipBhattacharya When I enter the name of the city with a mistake. Instead of a message about an erroneous input, the application crashes

  • @bahaar.208
    @bahaar.208 2 года назад

    Sir, how to use WeatherKit API rather than openWeatherMap api
    Please make video for weatherKit

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

      WeatherKit API requires Apple Developer Program membership. It's not a good match for developing Android apps.

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

    Thanks mate, really learnt a lot of things from this tutorial

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

    how to get API for open weather ?

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

      Hi @Meenakshi, check the link in video description.
      Open the link. Click subscribe (Current Weather Data) > Get API Key (Free) > Create a New Account > Get the API Key

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

    why do we need an app id?

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

      The OpenWeatherMap API key (APPID) is a unique identifier that authenticates requests associated with your project for usage and other details. So, it's required.

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

    Tysm

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

    nothing is popping up when i click on the button

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

    Cheers mate. Great tutorial

  • @LianIvanaSantos
    @LianIvanaSantos 5 месяцев назад +1

    Where's the file of Security

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

      Check the GitHub link in the video description. You should find the 'network_security_config.xml' file in the app/src/main/res/xml folder.

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

    why is mine not "Response Listener" ?,

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

    what is the url now?

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

    How do I enter the country code?

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

      Google 2-letter country code (ISO 3166-1 alpha-2)

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

      @@SandipBhattacharya Is there a video tutorial on how to put it on?

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

      You just need to type it in the EditText for Country Code as shown in the tutorial. You can also make a Spinner to select from a list of Country Codes.

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

    Please share the complete source code sir

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

      I've shared the complete source code on GitHub in the description, but it requires some updates due to recent changes in the OpenWeatherMap API. Please refer to my response to @ssmo's question for details.

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

    Thanks a lot

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

    Can you send me the background image alone

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

    Guess you might want to revise for loss of audio from from 0:29 till 3:47

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

      You mean the xml layout design part? Actually, I skipped that since I created so many tutorials on that earlier in the same playlist.

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

    4:50 pr #.## m error arha h

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

      What is the error message?
      And, where you're getting this error? (Like in "Logcat" or somewhere else?)

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

      @@SandipBhattacharya in code

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

      And pls one request also 4:24 pr ek appid h vo likhe agr apke vali hi likhe to chljayga project bcoj m sign up nhi krparhi

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

      No. Create your own app id.

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

      @@SandipBhattacharya but sir i can but it reject

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

    Great

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

    Yesss.. i love it

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

    sir how did you got that network security config file sir

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

      Check this out for network security config: ruclips.net/video/6U8-_G5yjwA/видео.html

  • @Paradox-tc4sx
    @Paradox-tc4sx Год назад +1

    Iam geeting volley.timeouterror

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

      In most of the cases, this error is occurred due to connectivity issue. So, if you are running this app on emulator, make sure you have internet access also in the emulator. If the problem persists, turn off your firewall and see.

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

    Thanks !