Added usage counter (maybe to be used later to ask people to rate the app)

This commit is contained in:
PhilippC 2013-03-06 21:25:30 +01:00
parent 5204292587
commit 1d05641e2a
3 changed files with 406 additions and 394 deletions

View File

@ -85,6 +85,13 @@ namespace keepass2android
protected override void OnCreate(Bundle savedInstanceState)
{
ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this);
long usageCount = prefs.GetLong(GetString(Resource.String.UsageCount_key), 0);
ISharedPreferencesEditor edit = prefs.Edit();
edit.PutLong(GetString(Resource.String.UsageCount_key), usageCount+1);
EditorCompat.apply(edit);
mShowPassword = ! prefs.GetBoolean(GetString(Resource.String.maskpass_key), Resources.GetBoolean(Resource.Boolean.maskpass_default));
base.OnCreate(savedInstanceState);

File diff suppressed because it is too large Load Diff

View File

@ -53,6 +53,8 @@
<string name="QuickUnlockLength_key">QuickUnlockLength</string>
<string name="QuickUnlockLength_default">3</string>
<string name="UsageCount_key"></string>
<string name="UseFileTransactions_key">UseFileTransactions</string>
<string name="clipboard_timeout_default">300000</string>