mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-25 18:52:19 -05:00
View-Intent handled correctly for Online version
This commit is contained in:
parent
de4f356b24
commit
8faf8b2392
@ -28,14 +28,6 @@ using keepass2android.view;
|
|||||||
namespace keepass2android
|
namespace keepass2android
|
||||||
{
|
{
|
||||||
[Activity (Label = AppNames.AppName, MainLauncher = true, Theme="@style/Base")]
|
[Activity (Label = AppNames.AppName, MainLauncher = true, Theme="@style/Base")]
|
||||||
[IntentFilter (new[]{Intent.ActionView},
|
|
||||||
Label=AppNames.AppLauncherTitle,
|
|
||||||
DataScheme="file",
|
|
||||||
DataMimeType="*/*",
|
|
||||||
DataHost="*",
|
|
||||||
DataPathPattern=".*kdbx", //TODO http://stackoverflow.com/questions/3400072/pathpattern-to-match-file-extension-does-not-work-if-a-period-exists-elsewhere-i
|
|
||||||
//http://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension
|
|
||||||
Categories=new[]{Intent.CategoryDefault, Intent.CategoryBrowsable})]
|
|
||||||
public class KeePass : LifecycleDebugActivity
|
public class KeePass : LifecycleDebugActivity
|
||||||
{
|
{
|
||||||
public const Android.App.Result EXIT_NORMAL = Android.App.Result.FirstUser;
|
public const Android.App.Result EXIT_NORMAL = Android.App.Result.FirstUser;
|
||||||
|
@ -298,6 +298,7 @@ namespace keepass2android
|
|||||||
|
|
||||||
mIoConnection = new IOConnectionInfo();
|
mIoConnection = new IOConnectionInfo();
|
||||||
|
|
||||||
|
|
||||||
if (action != null && action.Equals(VIEW_INTENT))
|
if (action != null && action.Equals(VIEW_INTENT))
|
||||||
{
|
{
|
||||||
mIoConnection.Path = i.DataString;
|
mIoConnection.Path = i.DataString;
|
||||||
@ -310,7 +311,7 @@ namespace keepass2android
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mIoConnection.Path = URLDecoder.Decode(mIoConnection.Path.Substring(7, mIoConnection.Path.Length));
|
mIoConnection.Path = URLDecoder.Decode(mIoConnection.Path.Substring(7));
|
||||||
|
|
||||||
if (mIoConnection.Path.Length == 0)
|
if (mIoConnection.Path.Length == 0)
|
||||||
{
|
{
|
||||||
|
@ -5,11 +5,7 @@
|
|||||||
package="keepass2android.keepass2android" android:installLocation="preferExternal">
|
package="keepass2android.keepass2android" android:installLocation="preferExternal">
|
||||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="14" />
|
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="14" />
|
||||||
<application android:label="keepass2android" android:icon="@drawable/ic_launcher">
|
<application android:label="keepass2android" android:icon="@drawable/ic_launcher">
|
||||||
<activity android:label="@string/app_name" android:theme="@style/Base" android:name="keepass2android.KeePass">
|
<activity android:configChanges="keyboardHidden|orientation" android:label="@string/app_name" android:theme="@style/Base" android:name="keepass2android.PasswordActivity" >
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
<intent-filter android:label="@string/app_name">
|
<intent-filter android:label="@string/app_name">
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
Loading…
Reference in New Issue
Block a user