-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Implemented Biometric Authentication in Compose Multi Platform"
This reverts commit fa0d0a2.
- Loading branch information
1 parent
b33029a
commit 540772a
Showing
119 changed files
with
220 additions
and
4,300 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
80 changes: 0 additions & 80 deletions
80
androidApp/src/main/java/com/mifos/passcode/MainActivity.kt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'com.google.devtools.ksp' | ||
apply plugin: 'com.google.dagger.hilt.android' | ||
|
||
android { | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_17 | ||
targetCompatibility JavaVersion.VERSION_17 | ||
} | ||
signingConfigs { | ||
release { | ||
storeFile file("../default_key_store.jks") | ||
storePassword "mifos1234" | ||
keyAlias "mifos-passcode" | ||
keyPassword "mifos1234" | ||
} | ||
} | ||
compileSdk 34 | ||
defaultConfig { | ||
namespace "com.mifos.passcode" | ||
minSdk 21 | ||
targetSdk 34 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
signingConfig signingConfigs.release | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
buildFeatures { | ||
compose true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.5.2" | ||
} | ||
kotlinOptions { | ||
jvmTarget = '17' | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(include: ['*.jar'], dir: 'libs') | ||
implementation 'androidx.appcompat:appcompat:1.4.1' | ||
implementation 'com.google.android.material:material:1.6.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' | ||
testImplementation 'junit:junit:4.13.2' | ||
androidTestImplementation 'androidx.test:runner:1.6.0-alpha04' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.0-alpha01' | ||
implementation project(':mifos-passcode') | ||
//implementation 'com.mifos.mobile:mifos-passcode:1.0.0' | ||
implementation "androidx.core:core-ktx:+" | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" | ||
implementation(project(":compose")) | ||
|
||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0") | ||
implementation("androidx.activity:activity-compose:1.8.2") | ||
implementation(platform("androidx.compose:compose-bom:2023.03.00")) | ||
implementation("androidx.compose.ui:ui") | ||
implementation("androidx.compose.ui:ui-graphics") | ||
implementation("androidx.compose.ui:ui-tooling-preview") | ||
implementation("androidx.compose.material3:material3") | ||
debugImplementation 'androidx.compose.ui:ui-tooling' | ||
debugImplementation 'androidx.compose.ui:ui-test-manifest' | ||
|
||
|
||
// Hilt Implementation | ||
implementation 'com.google.dagger:hilt-android:2.48.1' | ||
ksp("com.google.dagger:hilt-compiler:2.48.1") | ||
} | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
configurations.implementation { | ||
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8' | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.mifos.passcode | ||
|
||
import com.mifos.mobile.passcode.BasePassCodeActivity | ||
|
||
/** | ||
* Created by dilpreet on 19/01/18. | ||
*/ | ||
class BaseActivity : BasePassCodeActivity() { | ||
override val passCodeClass: Class<*> | ||
get() =//name of the activity which extends MifosPassCodeActivity | ||
PassCodeActivity::class.java | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.mifos.passcode | ||
|
||
import android.app.Application | ||
import com.mifos.mobile.passcode.utils.ForegroundChecker.Companion.init | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
/** | ||
* Created by dilpreet on 19/01/18. | ||
*/ | ||
|
||
@HiltAndroidApp | ||
class MifosApplication : Application() { | ||
override fun onCreate() { | ||
super.onCreate() | ||
//need to initialize this | ||
init(this) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package com.mifos.passcode | ||
|
||
import android.content.Intent | ||
import android.os.Bundle | ||
import android.widget.Toast | ||
import androidx.activity.compose.setContent | ||
import androidx.appcompat.app.AppCompatActivity | ||
import com.mifos.compose.PasscodeRepository | ||
import com.mifos.compose.component.PasscodeScreen | ||
import com.mifos.compose.theme.MifosPasscodeTheme | ||
import com.mifos.compose.utility.PreferenceManager | ||
import dagger.hilt.android.AndroidEntryPoint | ||
import javax.inject.Inject | ||
|
||
/** | ||
* Created by dilpreet on 19/01/18. | ||
*/ | ||
@AndroidEntryPoint | ||
class PassCodeActivity : AppCompatActivity() { | ||
|
||
@Inject | ||
lateinit var passcodeRepository: PasscodeRepository | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
MifosPasscodeTheme { | ||
PasscodeScreen( | ||
onForgotButton = { onPasscodeForgot() }, | ||
onSkipButton = { onPasscodeSkip() }, | ||
onPasscodeConfirm = { onPassCodeReceive(it) }, | ||
onPasscodeRejected = { onPasscodeReject() } | ||
) | ||
} | ||
} | ||
} | ||
|
||
private fun onPassCodeReceive(passcode: String) { | ||
if (passcodeRepository.getSavedPasscode() == passcode) { | ||
startActivity(Intent(this, LoginActivity::class.java)) | ||
Toast.makeText(this, "New Screen", Toast.LENGTH_SHORT).show() | ||
finish() | ||
} | ||
} | ||
|
||
private fun onPasscodeReject() {} | ||
|
||
private fun onPasscodeForgot() { | ||
// Add logic to redirect user to login page | ||
Toast.makeText(this, "Forgot Passcode", Toast.LENGTH_SHORT).show() | ||
} | ||
|
||
private fun onPasscodeSkip() { | ||
Toast.makeText(this, "Skip Button", Toast.LENGTH_SHORT).show() | ||
finish() | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<resources> | ||
<string name="app_name">mobile_passcode</string> | ||
<string name="fingerprint_dialog_title">Login</string> | ||
</resources> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.