Code example for Time

Methods: format2445, setToNow

0
                return null; 
            } 
        } 
 
        // Creating file 
        Time today = new Time(Time.getCurrentTimezone());
        today.setToNow();
        String dateTime = today.format2445();
        File mediaFile = new File(mediaStorageDir.getPath() + File.separator + "write_draw_share" + dateTime + ".jpg");
 
        return mediaFile;
    } 
 
    /** 
     * saves the image on canvas as a jpeg and text vile 
     *  
     * @return 
     */ 
    public File savePicture() {
        setDrawingCacheEnabled(true);
        setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);