makes app production ready
This commit is contained in:
parent
c213e51cdd
commit
6df001ed4c
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,3 +28,4 @@ google-services.json
|
||||
|
||||
# Android Profiling
|
||||
*.hprof
|
||||
*.aab
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.maenle.bump">
|
||||
package="com.maenle.bump"
|
||||
android:versionName="initial">
|
||||
|
||||
<uses-feature android:name="android.hardware.camera.any" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
|
@ -19,18 +19,18 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
|
||||
// [START receive_message]
|
||||
override fun onMessageReceived(remoteMessage: RemoteMessage) {
|
||||
// Not getting messages here? See why this may be: https://goo.gl/39bRNJ
|
||||
Log.d(TAG, "From: ${remoteMessage.from}")
|
||||
// Log.d(TAG, "From: ${remoteMessage.from}")
|
||||
|
||||
// TODO Step 3.5 check messages for data
|
||||
// Check if message contains a data payload.
|
||||
remoteMessage.data.let {
|
||||
Log.d(TAG, "Message data payload: " + remoteMessage.data)
|
||||
// Log.d(TAG, "Message data payload: " + remoteMessage.data)
|
||||
}
|
||||
|
||||
// TODO Step 3.6 check messages for notification and call sendNotification
|
||||
// Check if message contains a notification payload.
|
||||
remoteMessage.notification?.let {
|
||||
Log.d(TAG, "Message Notification Body: ${it.body}")
|
||||
// Log.d(TAG, "Message Notification Body: ${it.body}")
|
||||
sendNotification(it.body!!)
|
||||
}
|
||||
}
|
||||
|
@ -110,9 +110,9 @@ class CameraFragment: Fragment() {
|
||||
previewUseCase
|
||||
)
|
||||
} catch (illegalStateException: IllegalStateException) {
|
||||
Log.e(TAG, illegalStateException.message ?: "IllegalStateException")
|
||||
// Log.e(TAG, illegalStateException.message ?: "IllegalStateException")
|
||||
} catch (illegalArgumentException: IllegalArgumentException) {
|
||||
Log.e(TAG, illegalArgumentException.message ?: "IllegalArgumentException")
|
||||
// Log.e(TAG, illegalArgumentException.message ?: "IllegalArgumentException")
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,9 +153,9 @@ class CameraFragment: Fragment() {
|
||||
analysisUseCase
|
||||
)
|
||||
} catch (illegalStateException: IllegalStateException) {
|
||||
Log.e(TAG, illegalStateException.message ?: "IllegalStateException")
|
||||
// Log.e(TAG, illegalStateException.message ?: "IllegalStateException")
|
||||
} catch (illegalArgumentException: IllegalArgumentException) {
|
||||
Log.e(TAG, illegalArgumentException.message ?: "IllegalArgumentException")
|
||||
// Log.e(TAG, illegalArgumentException.message ?: "IllegalArgumentException")
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ class CameraFragment: Fragment() {
|
||||
blockingScanned = false
|
||||
}
|
||||
.addOnFailureListener {
|
||||
Log.e(TAG, it.message ?: it.toString())
|
||||
// Log.e(TAG, it.message ?: it.toString())
|
||||
}.addOnCompleteListener {
|
||||
// When the image is from CameraX analysis use case, must call image.close() on received
|
||||
// images when finished using them. Otherwise, new images may not be received or the camera
|
||||
@ -207,7 +207,7 @@ class CameraFragment: Fragment() {
|
||||
if (isCameraPermissionGranted()) {
|
||||
bindCameraUseCases()
|
||||
} else {
|
||||
Log.e(TAG, "no camera permission")
|
||||
// Log.e(TAG, "no camera permission")
|
||||
}
|
||||
}
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
||||
|
@ -125,7 +125,7 @@ class FirstFragment : Fragment() {
|
||||
try {
|
||||
bitmap = qrgEncoder.encodeAsBitmap()
|
||||
} catch (e: WriterException) {
|
||||
Log.d("Tag", e.toString())
|
||||
// Log.d("Tag", e.toString())
|
||||
}
|
||||
|
||||
if(nightModeFlags == Configuration.UI_MODE_NIGHT_YES) {
|
||||
@ -160,7 +160,7 @@ class FirstFragment : Fragment() {
|
||||
if (!task.isSuccessful) {
|
||||
curmessage = getString(R.string.message_subscribe_failed)
|
||||
}
|
||||
Log.d(TAG, curmessage.toString())
|
||||
// Log.d(TAG, curmessage.toString())
|
||||
}
|
||||
// [END subscribe_topics]
|
||||
}
|
||||
|
@ -29,9 +29,9 @@ class CameraXViewModel(application: Application) : AndroidViewModel(application)
|
||||
cameraProviderLiveData!!.setValue(cameraProviderFuture.get())
|
||||
} catch (e: ExecutionException) {
|
||||
// Handle any errors (including cancellation) here.
|
||||
Log.e(TAG, "Unhandled exception", e)
|
||||
// Log.e(TAG, "Unhandled exception", e)
|
||||
} catch (e: InterruptedException) {
|
||||
Log.e(TAG, "Unhandled exception", e)
|
||||
// Log.e(TAG, "Unhandled exception", e)
|
||||
}
|
||||
},
|
||||
ContextCompat.getMainExecutor(getApplication())
|
||||
|
@ -26,7 +26,7 @@ class RestSingleton constructor(context: Context){
|
||||
}
|
||||
|
||||
private val TAG = MainActivity::class.java.simpleName
|
||||
private const val URL = "http://192.168.68.127:4000/api/"
|
||||
private const val URL = "https://bump.maenle.net/api/"
|
||||
}
|
||||
|
||||
fun list(sender: String, callback: (JSONArray) -> Unit){
|
||||
|
Loading…
Reference in New Issue
Block a user