public override StartCommandResult OnStartCommand(Intent intent, StartCommandFlags flags, int startId) { _clipboardManager = GetSystemService(ClipboardService) as ClipboardManager; _clipboardManager.AddPrimaryClipChangedListener(new TestListener(this, _clipboardManager)); return(base.OnStartCommand(intent, flags, startId)); }
public override void OnCreate() { base.OnCreate(); ClipboardManager clipBoard = (ClipboardManager)GetSystemService(ClipboardService); clipBoard.AddPrimaryClipChangedListener(new OnPrimaryClipChangedListener()); }
public override void OnCreate() { base.OnCreate(); context = this; mHistoryFile = new File(GetExternalFilesDir(null), FILENAME); mClipboardManager = (ClipboardManager)GetSystemService(ClipboardService); mClipboardManager.AddPrimaryClipChangedListener(this); sharedPrefs = PreferenceManager.GetDefaultSharedPreferences(context); DisplayNotificationAnnInterface = new DisplayNotificationAnnTask(this); }