using System;
using Android.Content;
using Java.IO;
namespace HDL_ON_Android
{
///
/// 常用方法工具类
///
public class HDLONUtils
{
public HDLONUtils()
{
}
///
/// 发送广播,通知刷新图库的显示
///
///
public static void SendBroadcastScanFile(Context context, string path)
{
try
{
// 发送广播,通知刷新图库的显示
Intent scanIntent = new Intent(Intent.ActionMediaScannerScanFile);
scanIntent.SetData(Android.Net.Uri.FromFile(new File(path)));
context.SendBroadcast(scanIntent);
}
catch
{
System.Console.WriteLine("发送广播刷新图库 catch");
}
}
}
}