using System;
|
using Android.Content;
|
using Java.IO;
|
|
namespace HDL_ON_Android
|
{
|
/// <summary>
|
/// 常用方法工具类
|
/// </summary>
|
public class HDLONUtils
|
{
|
public HDLONUtils()
|
{
|
}
|
|
/// <summary>
|
/// 发送广播,通知刷新图库的显示
|
/// </summary>
|
/// <param name="path"></param>
|
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");
|
}
|
}
|
|
//public static void StartSplashActivity()
|
//{
|
// Intent intent = new Intent(Shared.Application.Activity, typeof(SplashActivity));
|
// Shared.Application.Activity.StartActivity(intent);
|
// Shared.Application.Activity.Finish();
|
//}
|
|
}
|
}
|