diff --git a/base/src/main/java/com/mhacks/app/data/network/fcm/FCMMessageHandler.kt b/base/src/main/java/com/mhacks/app/data/network/fcm/FCMMessageHandler.kt index d0a20485..0e700526 100644 --- a/base/src/main/java/com/mhacks/app/data/network/fcm/FCMMessageHandler.kt +++ b/base/src/main/java/com/mhacks/app/data/network/fcm/FCMMessageHandler.kt @@ -8,6 +8,7 @@ import androidx.core.app.NotificationManagerCompat import com.google.firebase.messaging.FirebaseMessagingService import com.google.firebase.messaging.RemoteMessage import timber.log.Timber +import com.mhacks.app.R /** * Service for handling push notifications. @@ -25,6 +26,7 @@ class FCMMessageHandler : FirebaseMessagingService() { private fun createNotification(notification: RemoteMessage.Notification) { val builder = NotificationCompat.Builder(baseContext, mhacksGroup) .setDefaults(Notification.DEFAULT_ALL) + .setSmallIcon(R.mipmap.ic_launcher_round) .setContentTitle(notification.title) .setContentText(notification.body) .setVibrate(longArrayOf(1000, 1000, 1000, 1000, 1000)) diff --git a/ui/src/main/java/com/mhacks/app/ui/map/widget/MapViewFragment.kt b/ui/src/main/java/com/mhacks/app/ui/map/widget/MapViewFragment.kt index 2ed6a26f..1a86f3b3 100644 --- a/ui/src/main/java/com/mhacks/app/ui/map/widget/MapViewFragment.kt +++ b/ui/src/main/java/com/mhacks/app/ui/map/widget/MapViewFragment.kt @@ -136,7 +136,7 @@ class MapViewFragment : BuildConfig.LNG ) ) - .zoom(16.5f) + .zoom(17.5f) .bearing(0f) .tilt(0f) .build() diff --git a/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanActivity.kt b/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanActivity.kt index c44d5b36..5a7651bb 100644 --- a/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanActivity.kt +++ b/ui/src/main/java/com/mhacks/app/ui/qrscan/QRScanActivity.kt @@ -22,6 +22,7 @@ import android.view.ScaleGestureDetector import android.view.View import androidx.annotation.NonNull import androidx.appcompat.app.AlertDialog +import androidx.appcompat.widget.AlertDialogLayout import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProvider import com.google.android.gms.common.ConnectionResult @@ -30,6 +31,8 @@ import com.google.android.gms.vision.MultiProcessor import com.google.android.gms.vision.barcode.Barcode import com.google.android.gms.vision.barcode.BarcodeDetector import com.google.android.material.snackbar.Snackbar +import com.mhacks.app.adapter.setTextMessage +import com.mhacks.app.data.models.common.TextMessage import com.mhacks.app.extension.viewModelProvider import com.mhacks.app.ui.common.BaseActivity import com.mhacks.app.ui.qrscan.widget.BarcodeGraphic @@ -107,7 +110,16 @@ class QRScanActivity: private fun subscribeUi() { qrScanViewModel?.verifyTicket?.observe(this, Observer { - showToast(R.string.checked_in) + var response = "" + for (feedback in it ) { + response += feedback.label + ": " + feedback.value + "\n" + } + + AlertDialog.Builder(this) + .setTitle("QR Response") + .setMessage(response) + .setPositiveButton("Ok") { dialog, which -> Timber.i(response) } + .show() }) qrScanViewModel?.snackBarMessage?.observe(this, Observer { @@ -142,6 +154,7 @@ class QRScanActivity: } findViewById(R.id.topLayout).setOnClickListener(listener) + Snackbar.make(graphicOverlay!!, R.string.permission_camera_rationale, Snackbar.LENGTH_INDEFINITE) .setAction(R.string.ok, listener)