I have already done proper research, but still lack information on the thing I would like to achieve.
So I would like to program an application where the user can record
Check this answer: Video streaming over WIFI?
Then if u want to see the live streaming in android phone then include vlc plugin inside your application and connect through real time streaming protocol(rtsp).
Intent i = new Intent("org.videolan.vlc.VLCApplication.gui.video.VideoPlayerActivity");
i.setAction(Intent.ACTION_VIEW);
i.setData(Uri.parse("rtsp://10.0.0.179:8086/"));
startActivity(i);
If u have installed VLC on your android phone, then you can stream using intent and pass the ip address and port no as shown above.