更新數據庫線程

public class ReflashImageThread implements Runnable
{ 

	Context context;
	static boolean begin = true;
	public static Uri uri;

	 public ReflashImageThread(Context context)
	{
		this.context = context;
	}

	public void run()
	{
		while (begin) {
			reflashImagesDatabase(this.context); 
			begin = false;
		}
	}

	public static void reflashImagesDatabase(Context context)
	{ 
		context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://"
				+ Environment.getExternalStorageDirectory())));
	}
}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章