mirror of
https://github.com/moparisthebest/keepass2android
synced 2025-01-30 14:40:21 -05:00
Added Changelog
Added menu options for translate, rate, suggestions Improved URL search Changed Version to 0.6.2
This commit is contained in:
parent
1106f618eb
commit
ff5f630c2e
@ -198,8 +198,8 @@ namespace keepass2android
|
||||
|
||||
}
|
||||
|
||||
public PwGroup SearchForHost(String url) {
|
||||
PwGroup group = searchHelper.searchForHost(this, url);
|
||||
public PwGroup SearchForHost(String url, bool allowSubdomains) {
|
||||
PwGroup group = searchHelper.searchForHost(this, url, allowSubdomains);
|
||||
|
||||
return group;
|
||||
|
||||
|
@ -511,12 +511,34 @@ namespace keepass2android
|
||||
timeoutCopyToClipboard(mEntry.Strings.ReadSafe (PwDefs.UserNameField));
|
||||
return true;
|
||||
*/
|
||||
case Resource.Id.menu_rate:
|
||||
try {
|
||||
Util.gotoMarket(this);
|
||||
} catch (ActivityNotFoundException) {
|
||||
Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
|
||||
}
|
||||
return true;
|
||||
case Resource.Id.menu_suggest_improvements:
|
||||
try {
|
||||
Util.gotoUrl(this, Resource.String.SuggestionsURL);
|
||||
} catch (ActivityNotFoundException) {
|
||||
Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
|
||||
}
|
||||
return true;
|
||||
case Resource.Id.menu_lock:
|
||||
App.setShutdown();
|
||||
SetResult(KeePass.EXIT_LOCK);
|
||||
Finish();
|
||||
return true;
|
||||
case Resource.Id.menu_translate:
|
||||
try {
|
||||
Util.gotoUrl(this, Resource.String.TranslationURL);
|
||||
} catch (ActivityNotFoundException) {
|
||||
Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return base.OnOptionsItemSelected(item);
|
||||
}
|
||||
|
@ -611,6 +611,28 @@ namespace keepass2android
|
||||
case Resource.Id.menu_cancel_edit:
|
||||
Finish();
|
||||
break;
|
||||
case Resource.Id.menu_rate:
|
||||
try {
|
||||
Util.gotoMarket(this);
|
||||
} catch (ActivityNotFoundException) {
|
||||
Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
|
||||
}
|
||||
return true;
|
||||
case Resource.Id.menu_suggest_improvements:
|
||||
try {
|
||||
Util.gotoUrl(this, Resource.String.SuggestionsURL);
|
||||
} catch (ActivityNotFoundException) {
|
||||
Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
|
||||
}
|
||||
return true;
|
||||
case Resource.Id.menu_translate:
|
||||
try {
|
||||
Util.gotoUrl(this, Resource.String.TranslationURL);
|
||||
} catch (ActivityNotFoundException) {
|
||||
Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -219,7 +219,27 @@ namespace keepass2android
|
||||
case Resource.Id.menu_sort:
|
||||
toggleSort();
|
||||
return true;
|
||||
|
||||
case Resource.Id.menu_rate:
|
||||
try {
|
||||
Util.gotoMarket(this);
|
||||
} catch (ActivityNotFoundException) {
|
||||
Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
|
||||
}
|
||||
return true;
|
||||
case Resource.Id.menu_suggest_improvements:
|
||||
try {
|
||||
Util.gotoUrl(this, Resource.String.SuggestionsURL);
|
||||
} catch (ActivityNotFoundException) {
|
||||
Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
|
||||
}
|
||||
return true;
|
||||
case Resource.Id.menu_translate:
|
||||
try {
|
||||
Util.gotoUrl(this, Resource.String.TranslationURL);
|
||||
} catch (ActivityNotFoundException) {
|
||||
Toast.MakeText(this, Resource.String.no_url_handler, ToastLength.Long).Show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnOptionsItemSelected(item);
|
||||
|
@ -24,6 +24,8 @@ using Android.Widget;
|
||||
using Android.OS;
|
||||
|
||||
using keepass2android.view;
|
||||
using Android.Preferences;
|
||||
using Android.Content.PM;
|
||||
|
||||
namespace keepass2android
|
||||
{
|
||||
@ -54,10 +56,59 @@ namespace keepass2android
|
||||
}
|
||||
|
||||
|
||||
protected override void OnStart() {
|
||||
protected override void OnStart()
|
||||
{
|
||||
base.OnStart();
|
||||
Android.Util.Log.Debug("DEBUG","KeePass.OnStart");
|
||||
startFileSelect();
|
||||
Android.Util.Log.Debug("DEBUG", "KeePass.OnStart");
|
||||
|
||||
ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this);
|
||||
|
||||
bool showChangeLog = false;
|
||||
try
|
||||
{
|
||||
PackageInfo packageInfo = PackageManager.GetPackageInfo(PackageName, 0);
|
||||
int lastInfoVersionCode = prefs.GetInt(GetString(Resource.String.LastInfoVersionCode_key), 0);
|
||||
if (packageInfo.VersionCode > lastInfoVersionCode)
|
||||
{
|
||||
showChangeLog = true;
|
||||
|
||||
ISharedPreferencesEditor edit = prefs.Edit();
|
||||
edit.PutInt(GetString(Resource.String.LastInfoVersionCode_key), packageInfo.VersionCode);
|
||||
EditorCompat.apply(edit);
|
||||
}
|
||||
|
||||
} catch (PackageManager.NameNotFoundException)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if (showChangeLog)
|
||||
{
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.SetTitle(GetString(Resource.String.ChangeLog_title));
|
||||
|
||||
builder.SetMessage(GetString(Resource.String.ChangeLog));
|
||||
|
||||
builder.SetPositiveButton(Android.Resource.String.Ok,new EventHandler<DialogClickEventArgs>((dlgSender, dlgEvt)=>{}));
|
||||
|
||||
Dialog dialog = builder.Create();
|
||||
dialog.DismissEvent += (object sender, EventArgs e) =>
|
||||
{
|
||||
startFileSelect();
|
||||
};
|
||||
dialog.Show();
|
||||
|
||||
|
||||
|
||||
} else
|
||||
{
|
||||
startFileSelect();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void startFileSelect() {
|
||||
@ -72,7 +123,7 @@ namespace keepass2android
|
||||
|
||||
|
||||
protected override void OnDestroy() {
|
||||
Android.Util.Log.Debug("DEBUG","KeePass.OnDestry"+IsFinishing.ToString());
|
||||
Android.Util.Log.Debug("DEBUG","KeePass.OnDestroy"+IsFinishing.ToString());
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:versionCode="5"
|
||||
android:versionName="0.6.1 beta"
|
||||
android:versionCode="6"
|
||||
android:versionName="0.6.2 beta"
|
||||
package="keepass2android.keepass2android" android:installLocation="preferExternal">
|
||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="14" />
|
||||
<application android:label="keepass2android" android:icon="@drawable/ic_launcher">
|
||||
|
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:versionCode="5"
|
||||
android:versionName="0.6.1 beta"
|
||||
android:versionCode="6"
|
||||
android:versionName="0.6.2 beta"
|
||||
package="keepass2android.keepass2android_nonet">
|
||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="14" />
|
||||
<application android:label="keepass2android" android:icon="@drawable/ic_launcher">
|
||||
|
||||
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name_nonet" android:theme="@style/Base" android:name="keepass2android.PasswordActivity" >
|
||||
<intent-filter android:label="@string/app_name">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
1384
src/keepass2android/Resources/Resource.designer.cs
generated
1384
src/keepass2android/Resources/Resource.designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -42,4 +42,18 @@
|
||||
android:title="@string/menu_copy_pass"
|
||||
android:showAsAction="ifRoom"
|
||||
/-->
|
||||
<item android:id="@+id/menu_suggest_improvements"
|
||||
android:icon="@android:drawable/ic_menu_directions"
|
||||
android:title="@string/suggest_improvements"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
<item android:id="@+id/menu_rate"
|
||||
android:icon="@android:drawable/star_off"
|
||||
android:title="@string/rate_app"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
<item android:id="@+id/menu_translate"
|
||||
android:title="@string/translate_app"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
</menu>
|
||||
|
@ -25,4 +25,18 @@
|
||||
android:title="@string/menu_donate"
|
||||
android:showAsAction="ifRoom"
|
||||
/-->
|
||||
<item android:id="@+id/menu_suggest_improvements"
|
||||
android:icon="@android:drawable/ic_menu_directions"
|
||||
android:title="@string/suggest_improvements"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
<item android:id="@+id/menu_rate"
|
||||
android:icon="@android:drawable/star_off"
|
||||
android:title="@string/rate_app"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
<item android:id="@+id/menu_translate"
|
||||
android:title="@string/translate_app"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
</menu>
|
@ -44,4 +44,19 @@
|
||||
android:title="@string/sort_name"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
|
||||
<item android:id="@+id/menu_suggest_improvements"
|
||||
android:icon="@android:drawable/ic_menu_directions"
|
||||
android:title="@string/suggest_improvements"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
<item android:id="@+id/menu_rate"
|
||||
android:icon="@android:drawable/star_off"
|
||||
android:title="@string/rate_app"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
<item android:id="@+id/menu_translate"
|
||||
android:title="@string/translate_app"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
</menu>
|
||||
|
@ -40,4 +40,15 @@
|
||||
android:icon="@android:drawable/ic_lock_lock"
|
||||
android:title="@string/menu_lock"
|
||||
/>
|
||||
<item android:id="@+id/menu_suggest_improvements"
|
||||
android:icon="@android:drawable/ic_menu_directions"
|
||||
android:title="@string/suggest_improvements"
|
||||
/>
|
||||
<item android:id="@+id/menu_rate"
|
||||
android:icon="@android:drawable/star_off"
|
||||
android:title="@string/rate_app"
|
||||
/>
|
||||
<item android:id="@+id/menu_translate"
|
||||
android:title="@string/translate_app"
|
||||
/>
|
||||
</menu>
|
||||
|
@ -28,5 +28,16 @@
|
||||
android:icon="@android:drawable/ic_menu_share"
|
||||
android:title="@string/menu_donate"
|
||||
/-->
|
||||
<item android:id="@+id/menu_suggest_improvements"
|
||||
android:icon="@android:drawable/ic_menu_directions"
|
||||
android:title="@string/suggest_improvements"
|
||||
/>
|
||||
<item android:id="@+id/menu_rate"
|
||||
android:icon="@android:drawable/star_off"
|
||||
android:title="@string/rate_app"
|
||||
/>
|
||||
<item android:id="@+id/menu_translate"
|
||||
android:title="@string/translate_app"
|
||||
/>
|
||||
</menu>
|
||||
|
||||
|
@ -40,4 +40,16 @@
|
||||
android:icon="@android:drawable/ic_menu_sort_by_size"
|
||||
android:title="@string/sort_name"
|
||||
/>
|
||||
<item android:id="@+id/menu_suggest_improvements"
|
||||
android:icon="@android:drawable/ic_menu_directions"
|
||||
android:title="@string/suggest_improvements"
|
||||
/>
|
||||
<item android:id="@+id/menu_rate"
|
||||
android:icon="@android:drawable/star_off"
|
||||
android:title="@string/rate_app"
|
||||
/>
|
||||
<item android:id="@+id/menu_translate"
|
||||
android:title="@string/translate_app"
|
||||
/>
|
||||
|
||||
</menu>
|
||||
|
@ -18,6 +18,7 @@
|
||||
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<resources>
|
||||
<string name="library_name"></string>
|
||||
<string name="default_file_path">/keepass/keepass.kdbx</string>
|
||||
<string name="donate_url"><![CDATA[https://www.paypal.com/TODO]]></string>
|
||||
<string name="homepage">http://keepass2android.codeplex.com</string>
|
||||
@ -53,9 +54,13 @@
|
||||
<string name="QuickUnlockLength_key">QuickUnlockLength</string>
|
||||
<string name="QuickUnlockLength_default">3</string>
|
||||
|
||||
<string name="UsageCount_key"></string>
|
||||
<string name="UsageCount_key">UsageCount</string>
|
||||
<string name="LastInfoVersionCode_key">LastInfoVersion</string>
|
||||
|
||||
<string name="UseFileTransactions_key">UseFileTransactions</string>
|
||||
<string name="MarketURL">market://details?id=</string>
|
||||
<string name="SuggestionsURL">https://keepass2android.codeplex.com/workitem/list/basic</string>
|
||||
<string name="TranslationURL">http://crowdin.net/project/keepass2android</string>
|
||||
|
||||
<string name="clipboard_timeout_default">300000</string>
|
||||
<string-array name="clipboard_timeout_values">
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.net-->
|
||||
<resources>
|
||||
<string name="library_name"></string>
|
||||
<string name="about_feedback">Feedback</string>
|
||||
<string name="about_homepage">Homepage</string>
|
||||
<string name="AboutText">Keepass2Android is a password manager providing read/write access to KeePass 2.x databases on Android.</string>
|
||||
@ -217,6 +216,24 @@
|
||||
<string name="AskReloadFile">The file which is currently open was changed by another program. Do you want to reload it?</string>
|
||||
<string name="AskDiscardChanges">Do you really want to discard the changes made? (The Save button is at the top of the form.)</string>
|
||||
<string name="AskDiscardChanges_title">Discard changes?</string>
|
||||
<string name="suggest_improvements">Suggest or vote for improvements</string>
|
||||
<string name="rate_app">Rate this app</string>
|
||||
<string name="translate_app">Translate KP2A</string>
|
||||
<string name="ChangeLog_title">Change log</string>
|
||||
<string name="ChangeLog"><b>Version 0.6.2</b>\n
|
||||
* Google Drive/Dropbox/... integration: Use the official Google Drive or Dropbox App and open any .kdbx-file. This will now bring up KP2A.\n
|
||||
* Improved Search Dialog \n
|
||||
* Improved search results for Share URL with subdomains\n
|
||||
* Added options to give feedback, and rate and translate the app in the menu\n
|
||||
\n
|
||||
<b>Version 0.6.1</b>\n
|
||||
* Detect when database changes in the background (i.e. due to activity of a sync app)\n
|
||||
* Improved searching for URLs from the browser\n
|
||||
* Confirm dialog when discarding changes\n
|
||||
\n
|
||||
<b>Version 0.6</b>\n
|
||||
Initial public release
|
||||
</string>
|
||||
<string-array name="clipboard_timeout_options">
|
||||
<item>30 seconds</item>
|
||||
<item>1 minute</item>
|
||||
|
@ -95,6 +95,7 @@ namespace keepass2android
|
||||
|
||||
private void query(String url)
|
||||
{
|
||||
//first: search for exact url
|
||||
try
|
||||
{
|
||||
mGroup = mDb.SearchForExactUrl(url);
|
||||
@ -104,11 +105,25 @@ namespace keepass2android
|
||||
Finish();
|
||||
return;
|
||||
}
|
||||
//if no results, search for host (e.g. "accounts.google.com")
|
||||
if (mGroup.Entries.Count() == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
mGroup = mDb.SearchForHost(url);
|
||||
mGroup = mDb.SearchForHost(url, false);
|
||||
} catch (Exception e)
|
||||
{
|
||||
Toast.MakeText(this, e.Message, ToastLength.Long).Show();
|
||||
Finish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
//if still no results, search for host, allowing subdomains ("www.google.com" in entry is ok for "accounts.google.com" in search (but not the other way around)
|
||||
if (mGroup.Entries.Count() == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
mGroup = mDb.SearchForHost(url, true);
|
||||
} catch (Exception e)
|
||||
{
|
||||
Toast.MakeText(this, e.Message, ToastLength.Long).Show();
|
||||
|
@ -26,6 +26,7 @@ using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
using Android.Widget;
|
||||
using Android.Content.PM;
|
||||
|
||||
namespace keepass2android
|
||||
{
|
||||
@ -51,6 +52,11 @@ namespace keepass2android
|
||||
public static void gotoUrl(Context context, int resId) {
|
||||
gotoUrl(context, context.GetString(resId));
|
||||
}
|
||||
|
||||
public static void gotoMarket(Context context)
|
||||
{
|
||||
gotoUrl(context, context.GetString(Resource.String.MarketURL)+context.PackageName);
|
||||
}
|
||||
|
||||
public static String getEditText(Activity act, int resId) {
|
||||
TextView te = (TextView) act.FindViewById(resId);
|
||||
|
@ -31,6 +31,7 @@ using System.Text.RegularExpressions;
|
||||
using KeePassLib.Collections;
|
||||
using KeePassLib.Interfaces;
|
||||
using KeePassLib.Utility;
|
||||
using Android.Util;
|
||||
|
||||
namespace keepass2android
|
||||
{
|
||||
@ -105,7 +106,7 @@ namespace keepass2android
|
||||
return UrlUtil.GetHost(url.Trim());
|
||||
}
|
||||
|
||||
public PwGroup searchForHost(Database database, String url)
|
||||
public PwGroup searchForHost(Database database, String url, bool allowSubdomains)
|
||||
{
|
||||
String host = extractHost(url);
|
||||
string strGroupName = mCtx.GetString(Resource.String.search_results) + " (\"" + host + "\")";
|
||||
@ -116,6 +117,8 @@ namespace keepass2android
|
||||
foreach (PwEntry entry in database.entries.Values)
|
||||
{
|
||||
String otherHost = extractHost(entry.Strings.ReadSafe(PwDefs.UrlField));
|
||||
if ((allowSubdomains) && (otherHost.StartsWith("www.")))
|
||||
otherHost = otherHost.Substring(4); //remove "www."
|
||||
if (String.IsNullOrWhiteSpace(otherHost))
|
||||
{
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user