i am doing video recording and save recording in my folder inside sdcard..now when i play video from sdcard i want to add date and time in video view , i am done with image means able to add time stamp in Image view using frame layout and Z-index but how would it to be done with video recording ..is it possible or not? if yes please suggest any way.. my code for adding time stamp in Image are given below with refrence URl..:
now how to do this same for video?
any help would be greatly apprciated here...
Bitmap src = BitmapFactory.decodeResource(getResources(), R.drawable.splashmodified); // the original file is cuty.jpg i added in resources
Bitmap dest = Bitmap.createBitmap(src.getWidth(), src.getHeight(), Bitmap.Config.ARGB_8888);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateTime = sdf.format(Calendar.getInstance().getTime()); // reading local time in the system
Canvas cs = new Canvas(dest);
Paint tPaint = new Paint();
tPaint.setTextSize(35);
tPaint.setColor(Color.BLUE);
tPaint.setStyle(Style.FILL);
cs.drawBitmap(src, 0f, 0f, null);
float height = tPaint.measureText("yY");
cs.drawText(dateTime, 20f, height+15f, tPaint);
try {
dest.compress(Bitmap.CompressFormat.JPEG, 100, new FileOutputStream(new File("/sdcard/timeStampedImage.jpg")));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}