Skip to content

Commit

Permalink
Update Android Example
Browse files Browse the repository at this point in the history
  • Loading branch information
ademar111190 committed Jan 31, 2016
1 parent db27e6c commit ae0118d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 101 deletions.
12 changes: 5 additions & 7 deletions Examples/Android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

compileSdkVersion 23
buildToolsVersion '23.0.2'

defaultConfig {
applicationId "se.simbio.encryption"
minSdkVersion 9
targetSdkVersion 22
versionCode 1
versionName "1.0"
}

}

dependencies {
compile files('libs/Encryption.jar')
compile 'com.github.simbiose:Encryption:v1.3.0'
}
Binary file removed Examples/Android/app/libs/Encryption.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.app.Activity;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
Expand All @@ -13,7 +14,6 @@
/**
* each click listener is an example of Encryption
*/

public class MainActivity extends Activity {

private static final String TAG = "Encryption";
Expand All @@ -26,6 +26,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);

mTextView = (TextView) findViewById(R.id.log_textView);
mTextView.setMovementMethod(new ScrollingMovementMethod());
interceptLog();

// the Normal Usage
Expand Down Expand Up @@ -86,7 +87,7 @@ public void onClick(View v) {
.setAlgorithm("AES/CBC/PKCS5Padding")
.setSecureRandomAlgorithm("SHA1PRNG")
.setSecretKeyType("PBKDF2WithHmacSHA1")
.setIv(new byte[] {29, 88, -79, -101, -108, -38, -126, 90, 52, 101, -35, 114, 12, -48, -66, -30})
.setIv(new byte[] { 29, 88, -79, -101, -108, -38, -126, 90, 52, 101, -35, 114, 12, -48, -66, -30 })
.build();
} catch (NoSuchAlgorithmException e) {
log("Something wrong: " + e);
Expand Down
3 changes: 2 additions & 1 deletion Examples/Android/app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<TextView
android:id="@+id/log_textView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:scrollbars="vertical"/>

</LinearLayout>
5 changes: 4 additions & 1 deletion Examples/Android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.android.tools.build:gradle:1.5.0'
}
}

allprojects {
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
}
90 changes: 0 additions & 90 deletions Examples/Android/gradlew.bat

This file was deleted.

0 comments on commit ae0118d

Please sign in to comment.