This file contains hidden or 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
    
  
  
    
  | package com.example.bioMetricApp.utils | |
| import android.content.Context | |
| import androidx.appcompat.app.AppCompatActivity | |
| import androidx.biometric.BiometricManager | |
| import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_STRONG | |
| import androidx.biometric.BiometricManager.Authenticators.DEVICE_CREDENTIAL | |
| import androidx.biometric.BiometricPrompt | |
| import androidx.core.content.ContextCompat | |
| import com.example.bioMetricApp.common.BiometricAuthListener | 
  
    
      This file contains hidden or 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
    
  
  
    
  | private fun callbackAPI() { | |
| val started = System.currentTimeMillis() | |
| val parentJob = CoroutineScope(Dispatchers.IO).launch { | |
| val job1 = launch { | |
| val time1 = measureTimeMillis { | |
| val result1 = callAPI1() | |
| setTextOnMainThread(result1) | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | private suspend fun callAPI1(): String { | |
| delay(2000) | |
| val data1 = ApiService.getService().getData() | |
| data1.let { | |
| return if (it.isSuccessful) { | |
| val firstname = callName(it.body()) | |
| firstname | |
| } else { | |
| "Unsuccessful#1" | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | CoroutineScope(Dispatchers.IO).launch { | |
| val job1 = launch{ | |
| val result1 = callAPI1() | |
| setTextOnMainThread(result1) | |
| } | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | @Composable | |
| fun GradientButton( | |
| text: String, | |
| gradient : Brush, | |
| modifier: Modifier = Modifier, | |
| onClick: () -> Unit = { }, | |
| ) { | |
| Button( | |
| modifier = modifier, | |
| colors = ButtonDefaults.buttonColors(backgroundColor = Color.Transparent), | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <com.google.android.material.progressindicator.LinearProgressIndicator | |
| android:id="@+id/progress_bar" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| app:trackCornerRadius="8dp" | |
| android:layout_margin="8dp" | |
| app:trackThickness="16dp" | |
| app:trackColor="#86A4F1" | |
| app:layout_constraintBottom_toBottomOf="parent" | |
| app:layout_constraintTop_toTopOf="parent" /> | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout 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" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context=".MainActivity"> | |
| <androidx.fragment.app.FragmentContainerView | |
| android:id="@+id/nav_fragment_host" | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <androidx.fragment.app.FragmentContainerView | |
| android:id="@+id/nav_fragment_host" | |
| android:name="androidx.navigation.fragment.NavHostFragment" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| app:defaultNavHost="true" | |
| app:layout_constraintBottom_toTopOf="@id/bottom_navigation" | |
| app:layout_constraintTop_toTopOf="parent" | |
| app:navGraph="@navigation/nav_host" /> | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <com.google.android.material.bottomnavigation.BottomNavigationView | |
| android:id="@+id/bottom_navigation" | |
| style="@style/Widget.MaterialComponents.BottomNavigationView.Colored" | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| android:elevation="16dp" | |
| app:itemRippleColor="@color/white" | |
| app:itemTextAppearanceActive="@color/white" | |
| app:labelVisibilityMode="selected" | |
| app:layout_constraintBottom_toBottomOf="parent" |