mirror of
https://github.com/shaulascr/ecommerce_serang.git
synced 2025-08-13 10:42:21 +00:00
fix apiservice
This commit is contained in:
@ -11,6 +11,8 @@ import dagger.hilt.android.HiltAndroidApp
|
|||||||
class App : Application(){
|
class App : Application(){
|
||||||
private val TAG = "AppSerang"
|
private val TAG = "AppSerang"
|
||||||
|
|
||||||
|
// var tokenTes: String? = null
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
|
||||||
@ -30,6 +32,7 @@ class App : Application(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
val token = task.result
|
val token = task.result
|
||||||
|
// tokenTes = token
|
||||||
Log.d(TAG, "FCM token retrieved: $token")
|
Log.d(TAG, "FCM token retrieved: $token")
|
||||||
|
|
||||||
// Save token locally
|
// Save token locally
|
||||||
@ -42,7 +45,6 @@ class App : Application(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun sendTokenToServer(token: String) {
|
private fun sendTokenToServer(token: String) {
|
||||||
// TODO: Implement your API call
|
|
||||||
Log.d(TAG, "Would send token to server: $token")
|
Log.d(TAG, "Would send token to server: $token")
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -74,6 +74,8 @@ class ChatRepository @Inject constructor(
|
|||||||
chatimg = imagePart
|
chatimg = imagePart
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Log.d("ChatRepository", "check data productId=$productIdPart, storeId=$storeIdPart, messageTxt=$messagePart, chatImg=$imagePart")
|
||||||
|
|
||||||
if (response.isSuccessful) {
|
if (response.isSuccessful) {
|
||||||
val body = response.body()
|
val body = response.body()
|
||||||
if (body != null) {
|
if (body != null) {
|
||||||
|
@ -28,6 +28,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
private lateinit var binding: ActivityMainBinding
|
private lateinit var binding: ActivityMainBinding
|
||||||
private lateinit var apiService: ApiService
|
private lateinit var apiService: ApiService
|
||||||
private lateinit var sessionManager: SessionManager
|
private lateinit var sessionManager: SessionManager
|
||||||
|
|
||||||
// private val viewModel: NotifViewModel by viewModels()
|
// private val viewModel: NotifViewModel by viewModels()
|
||||||
private val navController by lazy {
|
private val navController by lazy {
|
||||||
(supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment).navController
|
(supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment).navController
|
||||||
|
Reference in New Issue
Block a user