2014-05-06 23:58:20 -04:00
|
|
|
using System;
|
|
|
|
using Android.App;
|
2014-05-05 00:15:19 -04:00
|
|
|
using Android.Content;
|
2014-05-06 23:58:20 -04:00
|
|
|
using Android.OS;
|
|
|
|
using Android.Runtime;
|
2014-05-05 00:15:19 -04:00
|
|
|
using Android.Widget;
|
|
|
|
using KeePassLib.Security;
|
|
|
|
|
|
|
|
namespace keepass2android
|
|
|
|
{
|
2014-05-06 23:58:20 -04:00
|
|
|
[Service]
|
|
|
|
public class CopyToClipboardService: Service
|
2014-05-05 00:15:19 -04:00
|
|
|
{
|
2014-05-06 23:58:20 -04:00
|
|
|
public CopyToClipboardService()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public CopyToClipboardService(IntPtr javaReference, JniHandleOwnership transfer)
|
|
|
|
: base(javaReference, transfer)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-05-05 00:15:19 -04:00
|
|
|
public static void CopyValueToClipboardWithTimeout(Context ctx, string text)
|
|
|
|
{
|
|
|
|
Toast.MakeText(ctx, text, ToastLength.Short).Show();
|
|
|
|
}
|
2014-05-06 23:58:20 -04:00
|
|
|
|
|
|
|
public override IBinder OnBind(Intent intent)
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
2014-05-05 00:15:19 -04:00
|
|
|
}
|
|
|
|
}
|