feat: add DynamicFeatureModule
This commit introduces a Dagger Hilt module, `DynamicFeatureModule`, to provide a `SplitInstallManager` instance. This is intended for use with Play Feature Delivery, allowing the app to request and manage on-demand feature modules.
This commit is contained in:
parent
1153396638
commit
228a11092f
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.syaroful.agrilinkvocpro.di
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import com.google.android.play.core.splitinstall.SplitInstallManager
|
||||||
|
import com.google.android.play.core.splitinstall.SplitInstallManagerFactory
|
||||||
|
import dagger.Module
|
||||||
|
import dagger.Provides
|
||||||
|
import dagger.hilt.InstallIn
|
||||||
|
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||||
|
import dagger.hilt.components.SingletonComponent
|
||||||
|
import javax.inject.Singleton
|
||||||
|
|
||||||
|
@Module
|
||||||
|
@InstallIn(SingletonComponent::class)
|
||||||
|
object DynamicFeatureModule {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
fun provideSplitInstallManager(@ApplicationContext context: Context): SplitInstallManager {
|
||||||
|
return SplitInstallManagerFactory.create(context)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user