Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaitsewa Anastasia authored and Zaitsewa Anastasia committed Jul 12, 2015
1 parent b594707 commit ded3f5e
Show file tree
Hide file tree
Showing 41 changed files with 785 additions and 495 deletions.
45 changes: 39 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
/.idea/
/.gradle/
/build/
/idvos/build/
/idvos/idvos-release.apk
/local.properties
# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
classes/
gen/
tmp/
target/
out/
obj/

# Local configuration file (sdk path, etc)
local.properties

#Intellij IDEA
*.iml
.idea
gen-external-apklibs/

#Eclipse
.settings/
.project
.classpath

#Gradle generated files
build/
.gradle

.idea/workspace.xml
.idea/libraries
.DS_Store
11 changes: 0 additions & 11 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
buildscript {
repositories {
jcenter()
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}

allprojects {
repositories {
jcenter()
maven { url 'http://download.crashlytics.com/maven' }
}
}
1 change: 1 addition & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
27 changes: 27 additions & 0 deletions example/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "de.idvos.example"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile project(':idvos')
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
}
30 changes: 15 additions & 15 deletions idvos/idvos.iml → example/example.iml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":idvos" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="src" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<module external.linked.project.id=":example" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="idvos_android" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":idvos" />
<option name="GRADLE_PROJECT_PATH" value=":example" />
</configuration>
</facet>
<facet type="android" name="Android">
Expand All @@ -12,10 +12,12 @@
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugTestSources" />
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugTestSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
<task>generateDebugTestSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
Expand All @@ -24,7 +26,7 @@
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
<exclude-output />
Expand Down Expand Up @@ -84,19 +86,17 @@
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="pusher-java-client-0.3.1" level="project" />
<orderEntry type="library" exported="" name="slf4j-api-1.7.5" level="project" />
<orderEntry type="library" exported="" name="library-1.0.16" level="project" />
<orderEntry type="library" exported="" name="crashlytics-1.1.13" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" name="gson-2.2.2" level="project" />
<orderEntry type="library" exported="" name="support-v4-22.2.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-22.2.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-22.2.0" level="project" />
<orderEntry type="library" exported="" name="library-2.4.0" level="project" />
<orderEntry type="library" exported="" name="library-1.0.15" level="project" />
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
<orderEntry type="library" exported="" name="pusher-java-client-0.3.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
<orderEntry type="library" exported="" name="opentok-android-sdk-2.5.0" level="project" />
<orderEntry type="library" exported="" name="library-1.0.1" level="project" />
<orderEntry type="library" exported="" name="library-1.1.3" level="project" />
<orderEntry type="library" exported="" name="slf4j-api-1.7.5" level="project" />
<orderEntry type="module" module-name="idvos" exported="" />
</component>
</module>
17 changes: 17 additions & 0 deletions example/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/biovamp/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
13 changes: 13 additions & 0 deletions example/src/androidTest/java/de/idvos/example/ApplicationTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package de.idvos.example;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
22 changes: 22 additions & 0 deletions example/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.idvos.example" >

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:name=".ExampleApplication">
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
13 changes: 13 additions & 0 deletions example/src/main/java/de/idvos/example/ExampleApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package de.idvos.example;

import android.app.Application;

import de.idvos.fastonlineidentification.sdk.IdvosSDK;

public class ExampleApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
IdvosSDK.initialize(this, IdvosSDK.Mode.TEST);
}
}
46 changes: 46 additions & 0 deletions example/src/main/java/de/idvos/example/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package de.idvos.example;

import android.content.Intent;
import android.os.Parcelable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;

import de.idvos.fastonlineidentification.sdk.IdentificationResult;
import de.idvos.fastonlineidentification.sdk.IdvosSDK;

public class MainActivity extends AppCompatActivity {

private static final int REQUEST_CODE = 100;
private static final String HASH = "mxqC1jsvV4uaL_zRtFn7";

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
View button = findViewById(R.id.start_identification_btn);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
IdvosSDK.getInstance().startIdentification(MainActivity.this, REQUEST_CODE, HASH);
}
});
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode != REQUEST_CODE || resultCode != RESULT_OK){
return;
}
IdentificationResult result = data.getParcelableExtra(IdentificationResult.IDENTIFICATION_RESULT);
Toast.makeText(this,
"Success: " + String.valueOf(result.isSuccessful() + "; " +
"Transaction ID: " + result.getTransactionId()),
Toast.LENGTH_LONG
).show();
}
}
13 changes: 13 additions & 0 deletions example/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">

<Button
android:id="@+id/start_identification_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Start identification"/>
</RelativeLayout>
6 changes: 6 additions & 0 deletions example/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never" />
</menu>
Binary file added example/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions example/src/main/res/values-w820dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<resources>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
5 changes: 5 additions & 0 deletions example/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
6 changes: 6 additions & 0 deletions example/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<resources>
<string name="app_name">idvos example</string>

<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
</resources>
8 changes: 8 additions & 0 deletions example/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>

</resources>
17 changes: 1 addition & 16 deletions idvos/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
buildscript {
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}

dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.android.library'
apply plugin: 'crashlytics'

repositories {
maven { url 'http://download.crashlytics.com/maven' }
}


android {
compileSdkVersion 21
buildToolsVersion "21.1.1"

defaultConfig {
applicationId "de.idvos.fastonlineidentification"
minSdkVersion 9
targetSdkVersion 21
}
Expand Down
8 changes: 0 additions & 8 deletions idvos/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:name=".config.AppConfig"
android:label="@string/app_name"
android:theme="@style/AppTheme">

<activity
Expand All @@ -29,11 +26,6 @@
android:screenOrientation="portrait"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

<intent-filter>
<action android:name="idvos.intent.action.IDENTIFY"/>
<category android:name="android.intent.category.DEFAULT"/>
Expand Down
Loading

0 comments on commit ded3f5e

Please sign in to comment.