Android Open Source - MyVoice Utils






From Project

Back to project page MyVoice.

License

The source code is released under:

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> Everyone is permitted to copy and distribute verbatim or modified copies of this...

If you think the Android project MyVoice listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.c0ders.myvoice.models;
/*  w w w. jav a  2 s  .c  o m*/
import android.os.Environment;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author Manuel Wildauer <m.wildauer@gmail.com>
 */
public class Utils {
  
  public static String dateFormat(String dateFormat){
    SimpleDateFormat sdfDate = new SimpleDateFormat(dateFormat);
    Date now = new Date();
    String strDate = sdfDate.format(now);

    return strDate;
  }
  
  public static String getStoragePath(){
    String extStorage = Environment.getExternalStorageDirectory().getPath();
    
    File folder = new File(extStorage + "/myvoice");
    
    if(!folder.exists()) {
      folder.mkdir();
    }
    
    return extStorage + "/myvoice/";
  }
}




Java Source Code List

org.c0ders.myvoice.AboutActivity.java
org.c0ders.myvoice.LicenseActivity.java
org.c0ders.myvoice.MyVoiceActivity.java
org.c0ders.myvoice.SettingsActivity.java
org.c0ders.myvoice.models.TextToSpeechModel.java
org.c0ders.myvoice.models.Utils.java