new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
// 把sql文件寫入sd卡,然後把路徑給so
String mPath="";
if(android.os.Environment.getExternalStorageState().equals("mounted")){
mPath = android.os.Environment.getExternalStorageDirectory().toString()
+ "/com.newhaoli.Teamtips/";
}else{
mPath=android.os.Environment.getDataDirectory().getAbsolutePath()+
"/com.newhaoli.Teamtips/";
}
// TODO Auto-generated method stub
// 掃描或者復制整個文件夾到sd卡上
copyDir("Query", mPath+"Workflow/");
copyDir("htmlinc", mPath+"Workflow/");
copyDir("Html", mPath+"Workflow/");
}
}).start();
android 自帶有異步線程封裝的很好。