public override void CompleteOnCreateEntryActivity(EntryActivity activity) { Context ctx = activity; if (ctx == null) { ctx = Application.Context; } if (ShowUserNotifications) { //show the notifications activity.StartNotificationsService(CloseAfterCreate); } else { //to avoid getting into inconsistent state (LastOpenedEntry and Notifications): clear notifications: CopyToClipboardService.CancelNotifications(activity); } if (CloseAfterCreate) { //close activity.CloseAfterTaskComplete(); } }
public override void CompleteOnCreateEntryActivity(EntryActivity activity) { Context ctx = activity; if (ctx == null) { ctx = Application.Context; } if ((ShowUserNotifications == ShowUserNotificationsMode.Always) || ((ShowUserNotifications == ShowUserNotificationsMode.WhenTotp) && new Kp2aTotp().TryGetAdapter(new PwEntryOutput(activity.Entry, App.Kp2a.CurrentDb)) != null)) { //show the notifications activity.StartNotificationsService(ActivateKeyboard); } else { //to avoid getting into inconsistent state (LastOpenedEntry and Notifications): clear notifications: CopyToClipboardService.CancelNotifications(activity); } if (CloseAfterCreate) { //close activity.CloseAfterTaskComplete(); } }
public override void CompleteOnCreateEntryActivity(EntryActivity activity) { if (App.Kp2a.LastOpenedEntry != null) { App.Kp2a.LastOpenedEntry.SearchUrl = UrlToSearchFor; } base.CompleteOnCreateEntryActivity(activity); }
public override void AfterAddNewEntry(EntryEditActivity entryEditActivity, PwEntry newEntry) { EntryActivity.Launch(entryEditActivity, newEntry, -1, new SelectEntryTask { ShowUserNotifications = this.ShowUserNotifications }, ActivityFlags.ForwardResult); //no need to call Finish here, that's done in EntryEditActivity ("closeOrShowError") }
public bool OnSuggestionClick(int position) { var cursor = _suggestionsAdapter.Cursor; cursor.MoveToPosition(position); string entryIdAsHexString = cursor.GetString(cursor.GetColumnIndexOrThrow(SearchManager.SuggestColumnIntentDataId)); EntryActivity.Launch(_activity, App.Kp2a.GetDb().Entries[new PwUuid(MemUtil.HexStringToByteArray(entryIdAsHexString))], -1, _activity.AppTask); return(true); }
public PluginPopupMenuItem(EntryActivity activity, string pluginPackage, string fieldId, string popupItemId, string displayText, int iconId, Bundle bundleExtra) { _activity = activity; _pluginPackage = pluginPackage; _fieldId = fieldId; _popupItemId = popupItemId; _displayText = displayText; _iconId = iconId; _bundleExtra = bundleExtra; }
public override void CompleteOnCreateEntryActivity(EntryActivity activity) { //if the database is readonly (or no URL exists), don't offer to modify the URL if ((App.Kp2a.GetDb().CanWrite == false) || (String.IsNullOrEmpty(UrlToSearchFor))) { base.CompleteOnCreateEntryActivity(activity); return; } AskAddUrlThenCompleteCreate(activity, UrlToSearchFor); }
public override void CompleteOnCreateEntryActivity(EntryActivity activity) { if (App.Kp2a.LastOpenedEntry != null) { App.Kp2a.LastOpenedEntry.SearchUrl = UrlToSearchFor; } //if the database is readonly (or no URL exists), don't offer to modify the URL if ((App.Kp2a.CurrentDb.CanWrite == false) || (String.IsNullOrEmpty(UrlToSearchFor) || keepass2android.ShareUrlResults.GetSearchResultsForUrl(UrlToSearchFor).Entries.Any(e => e == activity.Entry))) { base.CompleteOnCreateEntryActivity(activity); return; } AskAddUrlThenCompleteCreate(activity, UrlToSearchFor); }
/// <summary> /// brings up a dialog asking the user whether he wants to add the given URL to the entry for automatic finding /// </summary> public void AskAddUrlThenCompleteCreate(EntryActivity activity, string url) { AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.SetTitle(activity.GetString(Resource.String.AddUrlToEntryDialog_title)); builder.SetMessage(activity.GetString(Resource.String.AddUrlToEntryDialog_text, new Java.Lang.Object[] { url })); builder.SetPositiveButton(activity.GetString(Resource.String.yes), (dlgSender, dlgEvt) => { activity.AddUrlToEntry(url, () => base.CompleteOnCreateEntryActivity(activity)); }); builder.SetNegativeButton(activity.GetString(Resource.String.no), (dlgSender, dlgEvt) => { base.CompleteOnCreateEntryActivity(activity); }); Dialog dialog = builder.Create(); dialog.Show(); }
public virtual void CompleteOnCreateEntryActivity(EntryActivity activity) { activity.StartNotificationsService(false); }
public WriteBinaryToFilePopupItem(string key, EntryActivity activity) { _key = key; _activity = activity; }
public ExportBinaryProcessManager(int requestCode, EntryActivity activity, Bundle savedInstanceState) : base(requestCode, activity) { _binaryToSave = savedInstanceState.GetString("BinaryToSave", null); }
public GotoUrlMenuItem(EntryActivity ctx, string urlFieldKey) { UrlFieldKey = urlFieldKey; _ctx = ctx; }
public ToggleVisibilityPopupMenuItem(EntryActivity activity, TextView valueView) { _activity = activity; _valueView = valueView; }
public PluginFieldReceiver(EntryActivity activity) { _activity = activity; }
public virtual void LaunchActivityForEntry(PwEntry pwEntry, int pos) { EntryActivity.Launch(this, pwEntry, pos, AppTask); }
public OpenBinaryPopupItem(string key, EntryActivity entryActivity) { _key = key; _entryActivity = entryActivity; }
public ToggleVisibilityPopupMenuItem(EntryActivity activity) { _activity = activity; }
public override void CompleteOnCreateEntryActivity(EntryActivity activity) { if (ShowUserNotifications) { //show the notifications activity.StartNotificationsService(CloseAfterCreate); } else { //to avoid getting into inconsistent state (LastOpenedEntry and Notifications): clear notifications: CopyToClipboardService.CancelNotifications(activity); } if (CloseAfterCreate) { //close activity.CloseAfterTaskComplete(); } }
public override void CompleteOnCreateEntryActivity(EntryActivity activity) { App.Kp2a.GetDb().LastOpenedEntry.SearchUrl = UrlToSearchFor; base.CompleteOnCreateEntryActivity(activity); }
public PluginActionReceiver(EntryActivity activity) { _activity = activity; }
public override void CompleteOnCreateEntryActivity(EntryActivity activity) { //if the user selects an entry before creating the new one, we're not closing the app base.CompleteOnCreateEntryActivity(activity); }
public GotoUrlMenuItem(EntryActivity ctx) { _ctx = ctx; }