From 744735d7bab1242a3049eb12f40880e64fc79813 Mon Sep 17 00:00:00 2001 From: Pritimay Sarkar Date: Mon, 2 Oct 2023 21:06:22 +0530 Subject: [PATCH] add download file size in MB and error code --- .../hpostesting/presentation/dashboard/DashboardActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/hpostesting/presentation/dashboard/DashboardActivity.kt b/app/src/main/java/com/example/hpostesting/presentation/dashboard/DashboardActivity.kt index fac7fd4..d27dd39 100644 --- a/app/src/main/java/com/example/hpostesting/presentation/dashboard/DashboardActivity.kt +++ b/app/src/main/java/com/example/hpostesting/presentation/dashboard/DashboardActivity.kt @@ -68,7 +68,7 @@ class DashboardActivity : AppCompatActivity() { .addOnProgressListener { updateProgress -> Toast.makeText( this, - "FirebaseAppDistribution progress: ${updateProgress.updateStatus}. ${updateProgress.apkBytesDownloaded}/${updateProgress.apkFileTotalBytes}", + "${updateProgress.updateStatus}. ${updateProgress.apkBytesDownloaded / 1048576} /${updateProgress.apkFileTotalBytes / 1048576} MB", Toast.LENGTH_SHORT ).show() } @@ -82,6 +82,7 @@ class DashboardActivity : AppCompatActivity() { else -> { // Handle other errors. + Toast.makeText(this, "AppDistribution error, status: ${e.errorCode}", Toast.LENGTH_SHORT).show() } } FirebaseCrashlytics.getInstance().recordException(e)