public async override void OnButtonUpOrDown(Context context, FlicButton button, bool wasQueued, int timeDiff, bool isUp, bool isDown) { var userService = DependencyService.Get <UserService>(); await UnlockService.TryUnlock(); base.OnButtonUpOrDown(context, button, wasQueued, timeDiff, isUp, isDown); }
public void OnInitialized(FlicManager manager) { FlicButton button = manager.CompleteGrabButton(RequestCode, (int)ResultCode, Data); if (button != null) { button.RegisterListenForBroadcast(FlicBroadcastReceiverFlags.UpOrDown | FlicBroadcastReceiverFlags.Removed); Toast.MakeText(Application.Context, "Grabbed a button", ToastLength.Short).Show(); } else { Toast.MakeText(Application.Context, "Did not grab any button", ToastLength.Short).Show(); } }