Files
hpos/app/src/main/java/com/example/hpostesting/HPOSTestingApplication.kt

38 lines
1.6 KiB
Kotlin
Raw Normal View History

2024-03-18 13:16:11 +05:30
/*
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
* // Notice: All information contained herein is, and remains
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
* // if any. The intellectual and technical concepts contained
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
* // and its suppliers and may be covered by Indian and Foreign Patents,
* // patents in process, and are protected by trade secret or copyright law.
* // Dissemination of this information or reproduction of this material
* // is strictly forbidden unless prior written permission is obtained
* // from ShanMukha Innovations Pvt. Ltd.
*/
2023-06-28 12:41:18 +05:30
package com.example.hpostesting
import android.app.Application
2023-09-16 05:43:27 +00:00
import com.google.firebase.firestore.FirebaseFirestore
import com.google.firebase.firestore.FirebaseFirestoreSettings
2023-06-28 12:41:18 +05:30
import dagger.hilt.android.HiltAndroidApp
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
@HiltAndroidApp
2024-02-14 12:47:39 +05:30
class HPOSTestingApplication : Application() {
2023-06-28 12:41:18 +05:30
val applicationScope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
2023-07-25 11:40:10 +05:30
2023-09-16 05:43:27 +00:00
override fun onCreate() {
super.onCreate()
val applicationScope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
val firestoreSettings = FirebaseFirestoreSettings.Builder()
.setPersistenceEnabled(true) // Enable offline persistence if needed
.build()
2023-07-25 11:40:10 +05:30
2023-09-16 05:43:27 +00:00
val firestore = FirebaseFirestore.getInstance()
firestore.firestoreSettings = firestoreSettings
}
2023-06-28 12:41:18 +05:30
}