Skip to content

Instantly share code, notes, and snippets.

View m4xp1's full-sized avatar
🚀
stronger, higher, faster

Dmitrii Makarov m4xp1

🚀
stronger, higher, faster
View GitHub Profile
/** Пример использования */
class MainActivity : AppCompatActivity(R.layout.activity_main) {
@Inject lateinit var fragmentFactory: FragmentFactory
override fun onCreate(savedInstanceState: Bundle?) {
DaggerActivityComponent
.factory()
.create()
.inject(this)
@m4xp1
m4xp1 / LibraryPermission.kt
Created December 15, 2021 08:29
Описание концепта пермишенов
class PermissionsManager(
private val application: Application
) {
private val mainThreadScope = CoroutineScope(Job() + Dispatchers.Main)
private var questionHandler: QuestionHandler? = null
private var requestLauncher: ActivityResultLauncher<Array<String>>? = null