Skip to content

Commit

Permalink
SDK updated to version 0.6 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnpandit12 committed May 26, 2022
1 parent b20ef83 commit fb21a94
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 84 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ Add this dependency to your project:
<dependency>
<groupId>com.attestr</groupId>
<artifactId>attestr-flowx</artifactId>
<version>0.4.0</version>
</dependency>
<version>0.6</version>
```

### Gradle users

Add this dependency to your project's build file:

```groovy
implementation "com.attestr:attestr-flowx:0.4.0"
implementation "com.attestr:attestr-flowx:0.6"
```

## Usage
Expand Down
11 changes: 6 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdk 21
targetSdk 31
versionCode 1
versionName "1.0"
versionName "2.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -32,11 +32,12 @@ android {
buildFeatures {
viewBinding true
}
namespace 'com.example.attestrapp'
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation "com.attestr:attestr-flowx:0.4.0"
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.attestr:attestr-flowx:0.6'
}
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.attestrapp">
xmlns:tools="http://schemas.android.com/tools">

<application
android:allowBackup="true"
Expand Down
26 changes: 1 addition & 25 deletions app/src/main/java/com/example/attestrapp/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AttestrFlowXList
private val handShakeError = "Enter handshake id"
private val clientKeyError = "Enter client key"
private var retrySpinner: Spinner? = null;
private var localeSpinner:Spinner? = null
private var isRetry = false
private var selectedLocale: String? = null
private var attestrFlowx: AttestrFlowx? = null
Expand All @@ -36,7 +35,6 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AttestrFlowXList
clientKeyEditText = mainBinding!!.clientKeyEditText
initiateSessionButton = mainBinding!!.initiateSessionButton
retrySpinner = mainBinding!!.retrySpinner
localeSpinner = mainBinding!!.localeSpinner

initiateSessionButton.setOnClickListener(this)

Expand All @@ -45,11 +43,6 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AttestrFlowXList
R.layout.spinner_items, resources
.getStringArray(R.array.retry_array)
)
val localSpinnerAdapter = ArrayAdapter(
this,
R.layout.spinner_items, resources
.getStringArray(R.array.locale_array)
)
retrySpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
retrySpinner!!.prompt = "Select Retry"
retrySpinner!!.adapter = retrySpinnerAdapter
Expand All @@ -68,23 +61,6 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AttestrFlowXList
}
}

localSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
localeSpinner!!.prompt = "Select Locale"
localeSpinner!!.adapter = localSpinnerAdapter
localeSpinner!!.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(
parent: AdapterView<*>?,
view: View,
position: Int,
id: Long
) {
selectedLocale = languages[position]
}

override fun onNothingSelected(parent: AdapterView<*>?) {
selectedLocale = languages[0]
}
}
attestrFlowx = AttestrFlowx()
}

Expand All @@ -96,7 +72,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener, AttestrFlowXList
if (!TextUtils.isEmpty(handShakeID) && !TextUtils.isEmpty(clientKey)) {
attestrFlowx?.init(clientKey, handShakeID, this)
attestrFlowx?.launch(
selectedLocale,
null,
isRetry,
null
)
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/res/layout-hdpi/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,6 @@
android:spinnerMode="dialog"
tools:ignore="SpeakableTextPresentCheck" />

<Spinner
android:id="@+id/locale_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:popupBackground="@android:color/white"
android:scrollbars="none"
android:minHeight="48dp"
android:spinnerMode="dialog"
tools:ignore="SpeakableTextPresentCheck" />

<Button
android:id="@+id/initiate_session_button"
android:layout_width="match_parent"
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/res/layout-xhdpi/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,6 @@
android:spinnerMode="dialog"
tools:ignore="SpeakableTextPresentCheck" />

<Spinner
android:id="@+id/locale_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:popupBackground="@android:color/white"
android:scrollbars="none"
android:minHeight="48dp"
android:spinnerMode="dialog"
tools:ignore="SpeakableTextPresentCheck" />

<Button
android:id="@+id/initiate_session_button"
android:layout_width="match_parent"
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/res/layout-xxhdpi/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@
android:spinnerMode="dialog"
tools:ignore="SpeakableTextPresentCheck" />

<Spinner
android:id="@+id/locale_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:popupBackground="@android:color/white"
android:scrollbars="none"
android:minHeight="48dp"
android:spinnerMode="dialog"
tools:ignore="SpeakableTextPresentCheck" />

<Button
android:id="@+id/initiate_session_button"
android:layout_width="match_parent"
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@
android:spinnerMode="dialog"
tools:ignore="SpeakableTextPresentCheck" />

<Spinner
android:id="@+id/locale_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:popupBackground="@android:color/white"
android:scrollbars="none"
android:minHeight="48dp"
android:spinnerMode="dialog"
tools:ignore="SpeakableTextPresentCheck" />

<Button
android:id="@+id/initiate_session_button"
android:layout_width="match_parent"
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Aug 25 13:48:53 IST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit fb21a94

Please sign in to comment.