You are here
Home > Android > File Uploading in Android using Web Service in PHP

File Uploading in Android using Web Service in PHP

Hello Friends, Today I will tell you file uploading in android using web service in PHP. Basically we will call web service developed in PHP using AsyncTask in android to upload file and we will get file name and file type in response.

PHP Code for Web Service

config.php

user.php

Android Code

AndroidManifest.xml

activity_main.xml

FilePath.java (getting selected file path code)

JsonParser.java (file uploading code using post method)

Note: Here in this class I’ve created get method also but that is not used you can remove that function

MainActivity.java

Output

File Uploading in Android using Web Service in PHP

Android Studio Project

 

Please share if you like it and if you have any query you can ask in comment

Rajesh Kumar Sahanee
I am a passionate Java Developer and I like Computer Programming. I love to do some interesting experiments and listening music in my free time.
http://www.zatackcoder.com

Comments

zatackcoder
Top