From: kenstir Date: Sat, 16 Nov 2013 02:25:02 +0000 (-0500) Subject: Added an android authenticator based on Apache 2.0 licensed code from https://github... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=20011f82809e0371b32fb660608dd00283e25a40;p=working%2FEvergreen.git Added an android authenticator based on Apache 2.0 licensed code from https://github.com/Udinic/AccountAuthenticator The main problem in the EG app in the android-minor-cleanup branch is that when the auth token expires or you rotate the device at the wrong time you get repeated crashes. My hypothesis is that using native android.accounts facilities for getting access to auth tokens will clean up the auth handling and also make authentication accessible to Services. --- diff --git a/.gitignore b/.gitignore index 8cd128a715..9c7a34d7cf 100644 --- a/.gitignore +++ b/.gitignore @@ -333,6 +333,3 @@ Open-ILS/examples/apache/eg.conf Open-ILS/examples/apache/eg_startup Open-ILS/examples/apache/eg_vhost.conf Open-ILS/src/support-scripts/eg_db_config -Open-ILS/src/Android/.settings/org.eclipse.jdt.core.prefs -Open-ILS/src/Android/local.properties -Open-ILS/src/Android/proguard-project.txt diff --git a/Open-ILS/src/Android/.gitignore b/Open-ILS/src/Android/.gitignore index 414f145df6..a284b9211d 100644 --- a/Open-ILS/src/Android/.gitignore +++ b/Open-ILS/src/Android/.gitignore @@ -3,4 +3,6 @@ *.dex bin/ gen/ - +.settings +local.properties +proguard-project.txt diff --git a/Open-ILS/src/AndroidAuthenticator/.classpath b/Open-ILS/src/AndroidAuthenticator/.classpath new file mode 100644 index 0000000000..7bc01d9a9c --- /dev/null +++ b/Open-ILS/src/AndroidAuthenticator/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Open-ILS/src/AndroidAuthenticator/.gitignore b/Open-ILS/src/AndroidAuthenticator/.gitignore new file mode 100644 index 0000000000..a284b9211d --- /dev/null +++ b/Open-ILS/src/AndroidAuthenticator/.gitignore @@ -0,0 +1,8 @@ +#ignore class objects +*.class +*.dex +bin/ +gen/ +.settings +local.properties +proguard-project.txt diff --git a/Open-ILS/src/AndroidAuthenticator/.project b/Open-ILS/src/AndroidAuthenticator/.project new file mode 100644 index 0000000000..a496b5eb75 --- /dev/null +++ b/Open-ILS/src/AndroidAuthenticator/.project @@ -0,0 +1,33 @@ + + + EvergreenAuthenticator + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/Open-ILS/src/AndroidAuthenticator/AndroidManifest.xml b/Open-ILS/src/AndroidAuthenticator/AndroidManifest.xml new file mode 100644 index 0000000000..33341c40fb --- /dev/null +++ b/Open-ILS/src/AndroidAuthenticator/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/AndroidAuthenticator/libs/android-support-v4.jar b/Open-ILS/src/AndroidAuthenticator/libs/android-support-v4.jar new file mode 100644 index 0000000000..9056828a04 Binary files /dev/null and b/Open-ILS/src/AndroidAuthenticator/libs/android-support-v4.jar differ diff --git a/Open-ILS/src/AndroidAuthenticator/libs/org.opensrf2_serialized_reg.jar b/Open-ILS/src/AndroidAuthenticator/libs/org.opensrf2_serialized_reg.jar new file mode 100644 index 0000000000..84c9b94883 Binary files /dev/null and b/Open-ILS/src/AndroidAuthenticator/libs/org.opensrf2_serialized_reg.jar differ diff --git a/Open-ILS/src/AndroidAuthenticator/project.properties b/Open-ILS/src/AndroidAuthenticator/project.properties new file mode 100644 index 0000000000..91d2b02460 --- /dev/null +++ b/Open-ILS/src/AndroidAuthenticator/project.properties @@ -0,0 +1,15 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-19 +android.library=true diff --git a/Open-ILS/src/AndroidAuthenticator/res/drawable-hdpi/evergreen_launcher_icon.png b/Open-ILS/src/AndroidAuthenticator/res/drawable-hdpi/evergreen_launcher_icon.png new file mode 100644 index 0000000000..1f2baa42e8 Binary files /dev/null and b/Open-ILS/src/AndroidAuthenticator/res/drawable-hdpi/evergreen_launcher_icon.png differ diff --git a/Open-ILS/src/AndroidAuthenticator/res/drawable-hdpi/ic_launcher.png b/Open-ILS/src/AndroidAuthenticator/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000000..96a442e5b8 Binary files /dev/null and b/Open-ILS/src/AndroidAuthenticator/res/drawable-hdpi/ic_launcher.png differ diff --git a/Open-ILS/src/AndroidAuthenticator/res/drawable-ldpi/evergreen_launcher_icon.png b/Open-ILS/src/AndroidAuthenticator/res/drawable-ldpi/evergreen_launcher_icon.png new file mode 100644 index 0000000000..a8da28a046 Binary files /dev/null and b/Open-ILS/src/AndroidAuthenticator/res/drawable-ldpi/evergreen_launcher_icon.png differ diff --git a/Open-ILS/src/AndroidAuthenticator/res/drawable-mdpi/evergreen_launcher_icon.png b/Open-ILS/src/AndroidAuthenticator/res/drawable-mdpi/evergreen_launcher_icon.png new file mode 100644 index 0000000000..63adfadea8 Binary files /dev/null and b/Open-ILS/src/AndroidAuthenticator/res/drawable-mdpi/evergreen_launcher_icon.png differ diff --git a/Open-ILS/src/AndroidAuthenticator/res/drawable-mdpi/ic_launcher.png b/Open-ILS/src/AndroidAuthenticator/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000000..359047dfa4 Binary files /dev/null and b/Open-ILS/src/AndroidAuthenticator/res/drawable-mdpi/ic_launcher.png differ diff --git a/Open-ILS/src/AndroidAuthenticator/res/drawable-xhdpi/evergreen_launcher_icon.png b/Open-ILS/src/AndroidAuthenticator/res/drawable-xhdpi/evergreen_launcher_icon.png new file mode 100644 index 0000000000..2c2adb18a4 Binary files /dev/null and b/Open-ILS/src/AndroidAuthenticator/res/drawable-xhdpi/evergreen_launcher_icon.png differ diff --git a/Open-ILS/src/AndroidAuthenticator/res/drawable-xhdpi/ic_launcher.png b/Open-ILS/src/AndroidAuthenticator/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..71c6d760f0 Binary files /dev/null and b/Open-ILS/src/AndroidAuthenticator/res/drawable-xhdpi/ic_launcher.png differ diff --git a/Open-ILS/src/AndroidAuthenticator/res/layout/activity_login.xml b/Open-ILS/src/AndroidAuthenticator/res/layout/activity_login.xml new file mode 100644 index 0000000000..18c2302a4d --- /dev/null +++ b/Open-ILS/src/AndroidAuthenticator/res/layout/activity_login.xml @@ -0,0 +1,38 @@ + + + + + + + +