Meshtastic-Android/app/src/main/java/com/geeksville/mesh/ApplicationModule.kt

18 lines
511 B
Kotlin
Raw Normal View History

package com.geeksville.mesh
import android.app.Application
import android.content.Context
import android.content.SharedPreferences
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
@InstallIn(SingletonComponent::class)
@Module
object ApplicationModule {
@Provides
fun provideSharedPreferences(application: Application): SharedPreferences {
return application.getSharedPreferences("ui-prefs", Context.MODE_PRIVATE)
}
}