How to Upload Image to Server in Android Studio

  Рет қаралды 24,129

Codes Easy

Codes Easy

Жыл бұрын

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.codeseasy.com/2022/up...
Google volley video explanation: • Google Volley Android ...
Join our WhatsApp group if you have any doubts: whatsappgroup.codeseasy.com
Find us on Social Media:
Website: www.codeseasy.com
Discord: / discord
Telegram: t.me/CodesEasyOfficial
Whatsapp: whatsapp.vishnusivadas.com
Whatsapp group: whatsappgroup.codeseasy.com
Facebook: / codeseasy
Instagram: / codeseasy
Twitter: / codeseasyblog
KZfaq: / codeseasy

Пікірлер: 67
@CodesEasy
@CodesEasy Жыл бұрын
​Feel free to ask all your doubts here
@CodesEasy
@CodesEasy Жыл бұрын
We will respond to all your comments
@ghienmatthe
@ghienmatthe Жыл бұрын
@@CodesEasy how to load image from db in app after upload? use glide liblary?
@CodesEasy
@CodesEasy Жыл бұрын
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🙏🙏
@hashimabdikadir7590
@hashimabdikadir7590 3 ай бұрын
this helped me a lot, Thanks.
@abdelazizelbekkar3319
@abdelazizelbekkar3319 Жыл бұрын
Thank you very much for this extremely instructive video. Very clear and consistent. Abdelaziz from Casablanca Morocco. I have integrated Codes Easy WhatsApp group.
@CodesEasy
@CodesEasy Жыл бұрын
Glad it was helpful!
@nagardharmik3856
@nagardharmik3856 Жыл бұрын
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
@CodesEasy
@CodesEasy Жыл бұрын
Glad it helped
@INEMEMONDAY
@INEMEMONDAY Жыл бұрын
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 ❤️
@alhanfy
@alhanfy Жыл бұрын
thanks a lot for your Code , and really nice support Team ,, really thanks a lot
@CodesEasy
@CodesEasy Жыл бұрын
Happy that you liked it
@janearltocson2965
@janearltocson2965 Жыл бұрын
nice content bro
@CodesEasy
@CodesEasy Жыл бұрын
Thanks for the visit
@rhiannamilindra8993
@rhiannamilindra8993 2 ай бұрын
Does this apply to uploading files also? if not, may you please suggest a website or tutorial vid that can help in java
@gurpreetkaur-jt2il
@gurpreetkaur-jt2il Жыл бұрын
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 Жыл бұрын
Here we are storing it as string.
@user-xu1hr6gi3v
@user-xu1hr6gi3v Жыл бұрын
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 Жыл бұрын
You want to read or download the image from the database to android, yes it's possible
@awaisahmad5908
@awaisahmad5908 6 ай бұрын
@CodesEasy
@CodesEasy 5 ай бұрын
👍
@candrasniper3404
@candrasniper3404 Жыл бұрын
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 Жыл бұрын
@@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
@user7468-v9m
@user7468-v9m Жыл бұрын
Can you tell me how much php i need to know for working with the database??
@CodesEasy
@CodesEasy Жыл бұрын
Learn the basics and then about the bd connecting part
@RudiMuryanta
@RudiMuryanta Жыл бұрын
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.
@deliciasyifamaghfira4380
@deliciasyifamaghfira4380 Жыл бұрын
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
@shubhangandas4148
@shubhangandas4148 Жыл бұрын
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 Жыл бұрын
can you do how to read image from mysql to android studio??
@CodesEasy
@CodesEasy Жыл бұрын
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. kzfaq.info/get/bejne/iq1yncie0dCWfYE.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
@samccxr7789
@samccxr7789 Жыл бұрын
Is it possible to store ssms using volley
@CodesEasy
@CodesEasy Жыл бұрын
Volley is an http library
@jeraldkasim2363
@jeraldkasim2363 Жыл бұрын
Hello, please make an tutorial on sms notification with interval time in android studio
@CodesEasy
@CodesEasy Жыл бұрын
sure 👍
@jeraldkasim2363
@jeraldkasim2363 Жыл бұрын
@@CodesEasy thanks😊
@akashchoudhary6876
@akashchoudhary6876 Жыл бұрын
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
@muhammadjunaidbashir8873
@muhammadjunaidbashir8873 Жыл бұрын
will it work for android sdk 33?
@CodesEasy
@CodesEasy Жыл бұрын
Yes
@CodesEasy
@CodesEasy Жыл бұрын
In the video we are using SDK version 33 itself
@jozefpalenik5354
@jozefpalenik5354 10 ай бұрын
How to upload photo into another folder in phone ?
@CodesEasy
@CodesEasy 10 ай бұрын
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
@chirocatt1900
@chirocatt1900 Жыл бұрын
How to make circle image ??
@chirocatt1900
@chirocatt1900 Жыл бұрын
For profile photo
@CodesEasy
@CodesEasy Жыл бұрын
add imageview inside cardview and add radios for cardview
@chirocatt1900
@chirocatt1900 Жыл бұрын
@@CodesEasy thankyouuu,
@Abhishek_Dalmia_MFP
@Abhishek_Dalmia_MFP Жыл бұрын
Why my uploaded image is getting crupted
@CodesEasy
@CodesEasy Жыл бұрын
There will be something wrong with your code.
@atiqulislam2626
@atiqulislam2626 Жыл бұрын
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. 👍
What's going on with Windows Laptops?
10:30
Marques Brownlee
Рет қаралды 2,6 МЛН
小蚂蚁被感动了!火影忍者 #佐助 #家庭
00:54
火影忍者一家
Рет қаралды 34 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 11 МЛН
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 66 МЛН
Why Starbucks Is Struggling
12:06
CNBC
Рет қаралды 490 М.
Indonesia’s $33B Capital Relocation Plan Is Imploding | WSJ Breaking Ground
7:11
The Wall Street Journal
Рет қаралды 651 М.
Retrofit Tutorial - How to Upload Files to Server
11:49
Future Studio
Рет қаралды 81 М.
DHH discusses SQLite (and Stoicism)
54:00
Aaron Francis
Рет қаралды 57 М.
How to Send Email from Android on SMTP using PHP API
34:31
Codes Easy
Рет қаралды 1,5 М.
How to Upload a File With Retrofit - Android Studio Tutorial
16:33
Philipp Lackner
Рет қаралды 40 М.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 933 М.
Why UK 🇬🇧 is going Bankrupt? : Detailed Economic Case Study
20:37