Check out Red5 - http://www.red5.org/
It's a free open source platform for streaming media to flash / flex. It's been around for years and quite mature.
Telling you how to implement it for your particular situation is out of scope of a Q&A format, but I can tell you from experience that red5 is an easy to implement solution relative to rolling your own or flash media server (which is pricey!)
More tutorials and examples here:
http://trac.red5.org/wiki/Documentation
If you decide to write your own (why?) - check out Java Media Framework (JMF) - http://www.oracle.com/technetwork/java/javase/specdownload-136569.html
For android - you're going to want to take a look at :
android.hardware.Camera;
android.media.MediaRecorder;
then something along the lines of :
recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264); // might try MPEG_4_SP as well
recorder.start();
I specified in the above codecs that are in a format that is friendly to flash.