Download Complete Source Code of Android Insert Video To Database Server

How your App will look like on Android Phone?

Upload Video App

Download Complete Source Code of Android Insert Video To Sql Server

Ready these things for Upload Video App

1) Android Studio Or Eclipse.

2) SQL Server.

3) Android Device.

4) Firewall must allow to connect to the database. (or turn off firewall from control panel)

5) Download and add the 1.2.7 version of jtds jar file and include it in your project. If you donot know how to include a Jar file, See how to include jtds jar file to your project HERE.

Couple of things you need to keep in your mind

1) You cannot upload video bigger than 2.5-3mb at once because Android Studio will through an exception of "out of memory." So you must upload video less than 3mb.

2) If you want to upload a video bigger than 3mb then you must break your video into chunks and upload those chunks in to the server.

3) Must follow all steps and read them carefully.

4) This code is written with comments. So for learning purpose, never copy and paste the code. Understand the code well so that you would be able to alter it.

5) Let me know the mistakes you think I have done in this project. Suggestions are warmly welcome.

6) You need to alter the database connection credentials used in this tutorial according to your server. You need to change the Ip:port/, username, password, database name in this tutorial with your server. The credentials used here are dummy.

Let's get Started...

Your jtds Jar file should look like this
upload video jtds add

After following all the steps above, you need to open your App gradle module and add the following line into it

build.gradle (Module App)

Like this screenshot below:

upload video app gradle

Now, Open your AndroidManifest.xml file and add the following Read, Write and Internet permissions after < /application> tag so that we will be able to access the gallery.


Now, Open your activity_main.xml file and paste the following code. This will be the layout of your video upload application


After adding the XML to your app, Your app design would look like this:

Upload Video App

Last Step for the app completion, Open your file and replace the following code. Don't overwrite the package name of your app.

NOTE: Every line is commented to make you people understand well. Also, don't forget to change the database credentials according to your own need.

Screenshots of the App :

android upload video app android upload video android upload video android upload video

NOTE: If you got out of memory exception then you must check and upload video less than 3mb as I told before.

Download Complete Source Code of Android Insert Video To Database Server