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
    
  
  
    
  | Flutter | |
| Flutter create project_name | |
| Code . | |
| jks file | |
| A keystore is a container of certificates, private keys etc. There are specifications of what should be the format of this keystore and the predominant is the #PKCS12. JKS is Java's keystore implementation. There is also BKS etc. These are all keystore types. | |
| FlutterActivity | |
| For android, main activity extends FlutterActivity | 
  
    
      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
    
  
  
    
  | /* Declare variables */ | |
| private var images: ArrayList<Uri?>? = null | |
| private val PICK_IMAGES_CODE = 0 | |
| private lateinit var image_adapter : image_upload_adapter | |
| /* button click */ | |
| imagepickBtn.setOnClickListener { | |
| openImageFileChooser() | |
| } | 
  
    
      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
    
  
  
    
  | // declare variables | |
| private val PICK_IMAGES_CODE1 = 0 | |
| private var file1 : File?=null | |
| // add this libery | |
| implementation 'com.nbsp:materialfilepicker:1.9.1' | |
| // request for permissions | |
| // add this libery | |
| implementation 'com.github.fondesa:kpermissions:3.1.3' | 
  
    
      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
    
  
  
    
  | // Adding dependency | |
| def roomVersion = "1.1.1" | |
| implementation "android.arch.persistence.room:runtime:$roomVersion" | |
| kapt "android.arch.persistence.room:compiler:$roomVersion" | |
| // 2: Lifecycle Components | |
| def lifecycleVersion = "1.1.1" | |
| implementation "android.arch.lifecycle:extensions:$lifecycleVersion" | |
| // Room components | 
  
    
      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
    
  
  
    
  | // Declare a boolen variable | |
| private var doubleBackToExitPressedOnce = false | |
| // override onBackPress method | |
| override fun onBackPressed() { | |
| if (doubleBackToExitPressedOnce) { | |
| val intent = Intent(this, AuthActivity::class.java) | |
| startActivity(intent) | |
| finish() | 
  
    
      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
    
  
  
    
  | // declare variables | |
| FirebaseAuth mAuth; | |
| CallbackManager callbackManager; | |
| FirebaseAuth.AuthStateListener authStateListener; | |
| AccessTokenTracker mAccessTokenTracker; | |
| LoginButton login; | |
| // on button click | |
| mAuth.signOut(); | 
  
    
      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
    
  
  
    
  | // declare variables | |
| public ProgressDialog progressDialog; | |
| private FirebaseAuth firebaseAuth; | |
| private GoogleSignInClient mGoogleSignInClient; | |
| private final static int RC_SIGN_IN = 123; | |
| ImageButton google_sign_buton; | |
| // initlize variables | 
  
    
      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
    
  
  
    
  | Prevent NestedScrollView automatically scrolling to bottom | |
| // add this line to child layout | |
| // android:descendantFocusability="blocksDescendants" | |
| Start activity from adapter | |
| context?.startActivity(Intent(context, ActivityName::class.java)) | |