Skip to content

Instantly share code, notes, and snippets.

View oyeraghib's full-sized avatar
🪐

Mohd Raghib oyeraghib

🪐
  • 15:09 (UTC -12:00)
View GitHub Profile
@oyeraghib
oyeraghib / gist:a2e0daa8239eb0b8cc46974f958937ba
Created July 26, 2022 15:05
Firestore Only add if doesn't exists
class AddDeviceFragment : Fragment() {
private var _binding: FragmentAddDeviceBinding? = null
private val binding get() = _binding!!
//firestore instance
private lateinit var firestore: FirebaseFirestore
//auth instance
private lateinit var auth: FirebaseAuth
@oyeraghib
oyeraghib / Dependencies.txt
Last active July 15, 2022 15:46
Retrofit Moshi for Kotlin Android
plugins {
id 'kotlin-kapt'
}
//Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation "com.squareup.retrofit2:converter-moshi:2.9.0"
implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2"
//Moshi
@oyeraghib
oyeraghib / gist:682538f531939fe3ad0a8d5725902d2c
Created September 23, 2021 11:45
Dependency for using Retrfoit, Moshi with Kotlin Coroutines
//Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation "com.squareup.retrofit2:converter-moshi:2.9.0"
implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2"
// Moshi
implementation "com.squareup.moshi:moshi:1.12.0"
kapt "com.squareup.moshi:moshi-kotlin-codegen:1.12.0"