fix apiservice

This commit is contained in:
shaulascr
2025-05-14 23:02:08 +07:00
parent 0ad1d7b9f2
commit b988a2e4bc
3 changed files with 6 additions and 1 deletions

View File

@ -11,6 +11,8 @@ import dagger.hilt.android.HiltAndroidApp
class App : Application(){
private val TAG = "AppSerang"
// var tokenTes: String? = null
override fun onCreate() {
super.onCreate()
@ -30,6 +32,7 @@ class App : Application(){
}
val token = task.result
// tokenTes = token
Log.d(TAG, "FCM token retrieved: $token")
// Save token locally
@ -42,7 +45,6 @@ class App : Application(){
}
private fun sendTokenToServer(token: String) {
// TODO: Implement your API call
Log.d(TAG, "Would send token to server: $token")
}
}

View File

@ -74,6 +74,8 @@ class ChatRepository @Inject constructor(
chatimg = imagePart
)
Log.d("ChatRepository", "check data productId=$productIdPart, storeId=$storeIdPart, messageTxt=$messagePart, chatImg=$imagePart")
if (response.isSuccessful) {
val body = response.body()
if (body != null) {

View File

@ -28,6 +28,7 @@ class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
private lateinit var apiService: ApiService
private lateinit var sessionManager: SessionManager
// private val viewModel: NotifViewModel by viewModels()
private val navController by lazy {
(supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment).navController