How to Upload Image to Server in Android Studio

Поділитися
Вставка
  • Опубліковано 19 вер 2024
  • How to upload image to server from android gallery using Google Volley, PHP api and MySQL database to store the data. We will be also seeing how to create the upload api in PHP and also how to read these data from the database also.
    This is a helpful tutorial if you need to upload images from android mobile phone to a server on a button click. By the end of this tutorial, you'll have learned how to upload images from gallery toserver, and you'll have a better understanding of Android Studio.
    Download full source code: youtube.codese...
    Google volley video explanation: • Google Volley Android ...
    Join our WhatsApp group if you have any doubts: whatsappgroup....
    Find us on Social Media:
    Website: www.codeseasy.com
    Discord: / discord
    Telegram: t.me/CodesEasy...
    Whatsapp: whatsapp.vishn...
    Whatsapp group: whatsappgroup....
    Facebook: / codeseasy
    Instagram: / codeseasy
    Twitter: / codeseasyblog
    UA-cam: / codeseasy

КОМЕНТАРІ • 66

  • @CodesEasy
    @CodesEasy  Рік тому +1

    ​Feel free to ask all your doubts here

    • @CodesEasy
      @CodesEasy  Рік тому

      We will respond to all your comments

    • @ghienmatthe
      @ghienmatthe Рік тому +1

      @@CodesEasy how to load image from db in app after upload? use glide liblary?

    • @CodesEasy
      @CodesEasy  Рік тому +2

      If you are uploading the image to a server you will get a url and after that you can use that url to to load image. Use picasso or glide etc to load image. I am going to publish a video on it soon. ❤️

    • @ghienmatthe
      @ghienmatthe Рік тому

      @@CodesEasy Thanks

    • @newtechnicpro852
      @newtechnicpro852 Рік тому

      I like your video very much, I have a request to you, how can I show the app again by uploading the image to the server. Please share one such video. I have a project I'm working on so far I can't do the rest🙏🙏

  • @nagardharmik3856
    @nagardharmik3856 Рік тому +1

    i try it to 3 to 4 days and i see your video. just thanks. i cant explain how much thanks i wnat to say but i want to thank you

  • @INEMEMONDAY
    @INEMEMONDAY Рік тому +1

    You just made my day, I was facing an error converting Bitmap to String because I was using java.utils instead of android.utils, thankyou so much😊, I just subscribed and liked

    • @CodesEasy
      @CodesEasy  Рік тому

      Happy that the video was helpful for you ❤️

  • @abdelazizelbekkar3319
    @abdelazizelbekkar3319 Рік тому +1

    Thank you very much for this extremely instructive video. Very clear and consistent. Abdelaziz from Casablanca Morocco. I have integrated Codes Easy WhatsApp group.

  • @rhiannamilindra8993
    @rhiannamilindra8993 4 місяці тому

    Does this apply to uploading files also?
    if not, may you please suggest a website or tutorial vid that can help in java

  • @hashimabdikadir7590
    @hashimabdikadir7590 5 місяців тому

    this helped me a lot, Thanks.

  • @candrasniper3404
    @candrasniper3404 Рік тому +1

    Thanks, it works. Why the upload image get bigger size (MB) than the original image from gallery? For the example, 2.66MB original image, then in the uploaded folder, it becomes 9.345MB.

    • @CodesEasy
      @CodesEasy  Рік тому

      You can change the compression value there in java part

    • @candrasniper3404
      @candrasniper3404 Рік тому +1

      @@CodesEasy the quality when compress the bitmap, isnt it? I've changed it. From 100 to 10. And it didn't works. The size in uploaded folder still same, 9.345MB. I use some repository implements such as imagePicker and using maxSize. it results bad image on 512x512kB from 3520x3520kb original size. Or because I choose png as the result? Is there a chance to compress image from android app side? Because it will send big data and consumes long sending time when I choose to compress it at the php side, in the purpose to make the reliable compressed image quality.

    • @CodesEasy
      @CodesEasy  Рік тому

      Check this solution in the link. Haven't check this in detail
      Check if this function and see it works. stackoverflow.com/a/23081997
      You simply try google shrink image size on android and you will get results

  • @alhanfy
    @alhanfy Рік тому +1

    thanks a lot for your Code , and really nice support Team ,, really thanks a lot

  • @gurpreetkaur-jt2il
    @gurpreetkaur-jt2il Рік тому +1

    Thank you for an amazing video. Just one question ,if I will use BLOB data type instead of text in 'path' field, will it work?

    • @CodesEasy
      @CodesEasy  Рік тому +1

      Here we are storing it as string.

  • @shubhangandas4148
    @shubhangandas4148 Рік тому +1

    we can create an app in android studio using html and css. How to create a button in the webpage that will act as a photo upload in android studio?

    • @CodesEasy
      @CodesEasy  Рік тому

      If you ask you can definitely do some work around for this but it's not recommended. Just use a webview or use android views.

  • @leonardo8156
    @leonardo8156 Рік тому +3

    can you do how to read image from mysql to android studio??

    • @CodesEasy
      @CodesEasy  Рік тому +1

      In the end you can see i show how to show it in web. Like that you just have to make a json response api. Watch this video to know how to do that. ua-cam.com/video/TGBjemlj2MM/v-deo.html
      Check the read operation part.

    • @leonardo8156
      @leonardo8156 Рік тому

      @@CodesEasy sorry i have tried but still error to fetch image from mysql. it works for retrieving text but not for images

  • @余宗錞
    @余宗錞 Рік тому +1

    sorry my english is not good,so I am writing this question using a translator.
    If use the volley kit and php, is it possible to reverse upload images from mysql to the app?

    • @CodesEasy
      @CodesEasy  Рік тому +1

      You want to read or download the image from the database to android, yes it's possible

  • @akashchoudhary6876
    @akashchoudhary6876 Рік тому +1

    All the steps are done right but the image uploaded becomes a file of under 2kb and not supported format

    • @CodesEasy
      @CodesEasy  Рік тому

      Then you might be doing something wrong

  • @janearltocson2965
    @janearltocson2965 Рік тому +1

    nice content bro

  • @jeraldkasim2363
    @jeraldkasim2363 Рік тому +1

    Hello, please make an tutorial on sms notification with interval time in android studio

  • @deliciasyifamaghfira4380
    @deliciasyifamaghfira4380 Рік тому +1

    halo, how to get the image back using shared preferences?

    • @CodesEasy
      @CodesEasy  Рік тому

      You can either store the data in shared preferences or you can retrieve the data again from the database, like in am showing in the video at the end. Return the image data only and display it in android

  • @RudiMuryanta
    @RudiMuryanta Рік тому +1

    do this work for android 10 or targetSdk 33 ?

    • @CodesEasy
      @CodesEasy  Рік тому

      Yes

    • @RudiMuryanta
      @RudiMuryanta Рік тому

      thank you so much, i've download your code. And now, i need rotate and crop before upload.

  • @jozefpalenik5354
    @jozefpalenik5354 11 місяців тому +1

    How to upload photo into another folder in phone ?

    • @CodesEasy
      @CodesEasy  11 місяців тому

      You mean move or copy a photo within the same device?
      This video is not for that. It's totally different. Google it or join our groups, discord etc and ask there

  • @AdrianoCarvalho-r2b
    @AdrianoCarvalho-r2b 29 днів тому

    sensacional

  • @samccxr7789
    @samccxr7789 Рік тому +1

    Is it possible to store ssms using volley

  • @awaisahmad5908
    @awaisahmad5908 7 місяців тому +1

  • @chirocatt1900
    @chirocatt1900 Рік тому +1

    How to make circle image ??

  • @muhammadjunaidbashir8873
    @muhammadjunaidbashir8873 Рік тому +1

    will it work for android sdk 33?

  • @Abhishek_Dalmia_MFP
    @Abhishek_Dalmia_MFP Рік тому +1

    Why my uploaded image is getting crupted

    • @CodesEasy
      @CodesEasy  Рік тому

      There will be something wrong with your code.

  • @atiqulislam2626
    @atiqulislam2626 Рік тому +1

    Why the premieres? ****

    • @CodesEasy
      @CodesEasy  Рік тому

      It will send you notification 30 mins before it starts.

    • @atiqulislam2626
      @atiqulislam2626 Рік тому

      @@CodesEasy It's too much boring

    • @CodesEasy
      @CodesEasy  Рік тому

      Not really it's useful is some ways, but sure we will consider publishing it directly also. 👍