Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
6df001ed4c | |||
c213e51cdd | |||
538974c6f6 |
1
.gitignore
vendored
@ -28,3 +28,4 @@ google-services.json
|
|||||||
|
|
||||||
# Android Profiling
|
# Android Profiling
|
||||||
*.hprof
|
*.hprof
|
||||||
|
*.aab
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
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-feature android:name="android.hardware.camera.any" />
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
@ -27,7 +28,7 @@
|
|||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.google.firebase.messaging.default_notification_icon"
|
android:name="com.google.firebase.messaging.default_notification_icon"
|
||||||
android:resource="@drawable/ic_launcher_foreground"/>
|
android:resource="@drawable/ic_stat_name"/>
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.google.firebase.messaging.default_notification_color"
|
android:name="com.google.firebase.messaging.default_notification_color"
|
||||||
|
BIN
app/src/main/ic_launcher-playstore.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
@ -8,7 +8,6 @@ import com.maenle.bump.util.sendNotification
|
|||||||
import com.google.firebase.messaging.FirebaseMessagingService
|
import com.google.firebase.messaging.FirebaseMessagingService
|
||||||
import com.google.firebase.messaging.RemoteMessage
|
import com.google.firebase.messaging.RemoteMessage
|
||||||
import com.maenle.bump.util.BumpProcessor
|
import com.maenle.bump.util.BumpProcessor
|
||||||
import com.maenle.bump.util.RestSingleton
|
|
||||||
|
|
||||||
class MyFirebaseMessagingService : FirebaseMessagingService() {
|
class MyFirebaseMessagingService : FirebaseMessagingService() {
|
||||||
|
|
||||||
@ -20,18 +19,18 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
// [START receive_message]
|
// [START receive_message]
|
||||||
override fun onMessageReceived(remoteMessage: RemoteMessage) {
|
override fun onMessageReceived(remoteMessage: RemoteMessage) {
|
||||||
// Not getting messages here? See why this may be: https://goo.gl/39bRNJ
|
// 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
|
// TODO Step 3.5 check messages for data
|
||||||
// Check if message contains a data payload.
|
// Check if message contains a data payload.
|
||||||
remoteMessage.data.let {
|
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
|
// TODO Step 3.6 check messages for notification and call sendNotification
|
||||||
// Check if message contains a notification payload.
|
// Check if message contains a notification payload.
|
||||||
remoteMessage.notification?.let {
|
remoteMessage.notification?.let {
|
||||||
Log.d(TAG, "Message Notification Body: ${it.body}")
|
// Log.d(TAG, "Message Notification Body: ${it.body}")
|
||||||
sendNotification(it.body!!)
|
sendNotification(it.body!!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,12 +44,11 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
* is initially generated so this is where you would retrieve the token.
|
* is initially generated so this is where you would retrieve the token.
|
||||||
*/
|
*/
|
||||||
override fun onNewToken(token: String) {
|
override fun onNewToken(token: String) {
|
||||||
Log.d(TAG, "Refreshed token: $token")
|
|
||||||
|
|
||||||
// If you want to send messages to this application instance or
|
// If you want to send messages to this application instance or
|
||||||
// manage this apps subscriptions on the server side, send the
|
// manage this apps subscriptions on the server side, send the
|
||||||
// Instance ID token to your app server.
|
// Instance ID token to your app server.
|
||||||
sendRegistrationToServer(token)
|
sendRegistrationToServer()
|
||||||
}
|
}
|
||||||
// [END on_new_token]
|
// [END on_new_token]
|
||||||
|
|
||||||
@ -60,7 +58,9 @@ class MyFirebaseMessagingService : FirebaseMessagingService() {
|
|||||||
*
|
*
|
||||||
* @param token The new token.
|
* @param token The new token.
|
||||||
*/
|
*/
|
||||||
private fun sendRegistrationToServer(token: String?) {
|
private fun sendRegistrationToServer() {
|
||||||
|
val bump = BumpProcessor.getInstance(baseContext)
|
||||||
|
bump.setFirebaseToken(baseContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -110,9 +110,9 @@ class CameraFragment: Fragment() {
|
|||||||
previewUseCase
|
previewUseCase
|
||||||
)
|
)
|
||||||
} catch (illegalStateException: IllegalStateException) {
|
} catch (illegalStateException: IllegalStateException) {
|
||||||
Log.e(TAG, illegalStateException.message ?: "IllegalStateException")
|
// Log.e(TAG, illegalStateException.message ?: "IllegalStateException")
|
||||||
} catch (illegalArgumentException: IllegalArgumentException) {
|
} catch (illegalArgumentException: IllegalArgumentException) {
|
||||||
Log.e(TAG, illegalArgumentException.message ?: "IllegalArgumentException")
|
// Log.e(TAG, illegalArgumentException.message ?: "IllegalArgumentException")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,9 +153,9 @@ class CameraFragment: Fragment() {
|
|||||||
analysisUseCase
|
analysisUseCase
|
||||||
)
|
)
|
||||||
} catch (illegalStateException: IllegalStateException) {
|
} catch (illegalStateException: IllegalStateException) {
|
||||||
Log.e(TAG, illegalStateException.message ?: "IllegalStateException")
|
// Log.e(TAG, illegalStateException.message ?: "IllegalStateException")
|
||||||
} catch (illegalArgumentException: IllegalArgumentException) {
|
} catch (illegalArgumentException: IllegalArgumentException) {
|
||||||
Log.e(TAG, illegalArgumentException.message ?: "IllegalArgumentException")
|
// Log.e(TAG, illegalArgumentException.message ?: "IllegalArgumentException")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ class CameraFragment: Fragment() {
|
|||||||
blockingScanned = false
|
blockingScanned = false
|
||||||
}
|
}
|
||||||
.addOnFailureListener {
|
.addOnFailureListener {
|
||||||
Log.e(TAG, it.message ?: it.toString())
|
// Log.e(TAG, it.message ?: it.toString())
|
||||||
}.addOnCompleteListener {
|
}.addOnCompleteListener {
|
||||||
// When the image is from CameraX analysis use case, must call image.close() on received
|
// 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
|
// images when finished using them. Otherwise, new images may not be received or the camera
|
||||||
@ -207,7 +207,7 @@ class CameraFragment: Fragment() {
|
|||||||
if (isCameraPermissionGranted()) {
|
if (isCameraPermissionGranted()) {
|
||||||
bindCameraUseCases()
|
bindCameraUseCases()
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "no camera permission")
|
// Log.e(TAG, "no camera permission")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults)
|
||||||
|
@ -76,7 +76,7 @@ class FirstFragment : Fragment() {
|
|||||||
binding.textviewEncryption.visibility = View.VISIBLE
|
binding.textviewEncryption.visibility = View.VISIBLE
|
||||||
binding.idIVQrcode.visibility = View.VISIBLE
|
binding.idIVQrcode.visibility = View.VISIBLE
|
||||||
binding.buttonView.text = getString(R.string.hide_sender)
|
binding.buttonView.text = getString(R.string.hide_sender)
|
||||||
message?.let { binding.textviewScan.text = it.sender.replace("-", "-\u200b")+"-"}
|
message?.let { binding.textviewScan.text = it.sender.replace("-", "-\u200b")}
|
||||||
} else {
|
} else {
|
||||||
binding.textviewEncryption.visibility = View.GONE
|
binding.textviewEncryption.visibility = View.GONE
|
||||||
binding.idIVQrcode.visibility = View.GONE
|
binding.idIVQrcode.visibility = View.GONE
|
||||||
@ -85,7 +85,7 @@ class FirstFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
message?.let { binding.textviewScan.text = it.sender.replace("-", "-\u200b")}
|
message?.let { binding.textviewScan.text = it.sender.replace("-", "-\u200b")}
|
||||||
message?.let { binding.textviewEncryption.text = it.password.replace("-", "-\u200b")}
|
message?.let { binding.textviewEncryption.text = "-" + it.password.replace("-", "-\u200b")}
|
||||||
message?.let {binding.idIVQrcode.setImageBitmap(generateQrCode(it.code))}
|
message?.let {binding.idIVQrcode.setImageBitmap(generateQrCode(it.code))}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ class FirstFragment : Fragment() {
|
|||||||
try {
|
try {
|
||||||
bitmap = qrgEncoder.encodeAsBitmap()
|
bitmap = qrgEncoder.encodeAsBitmap()
|
||||||
} catch (e: WriterException) {
|
} catch (e: WriterException) {
|
||||||
Log.d("Tag", e.toString())
|
// Log.d("Tag", e.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nightModeFlags == Configuration.UI_MODE_NIGHT_YES) {
|
if(nightModeFlags == Configuration.UI_MODE_NIGHT_YES) {
|
||||||
@ -160,7 +160,7 @@ class FirstFragment : Fragment() {
|
|||||||
if (!task.isSuccessful) {
|
if (!task.isSuccessful) {
|
||||||
curmessage = getString(R.string.message_subscribe_failed)
|
curmessage = getString(R.string.message_subscribe_failed)
|
||||||
}
|
}
|
||||||
Log.d(TAG, curmessage.toString())
|
// Log.d(TAG, curmessage.toString())
|
||||||
}
|
}
|
||||||
// [END subscribe_topics]
|
// [END subscribe_topics]
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
// Inflate the menu; this adds items to the action bar if it is present.
|
// Inflate the menu; this adds items to the action bar if it is present.
|
||||||
menuInflater.inflate(R.menu.menu_main, menu)
|
// menuInflater.inflate(R.menu.menu_main, menu)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class BumpProcessor constructor(context: Context) {
|
|||||||
return log
|
return log
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setFirebaseToken(context: Context) {
|
fun setFirebaseToken(context: Context) {
|
||||||
val tokenTask = FirebaseMessaging.getInstance().token
|
val tokenTask = FirebaseMessaging.getInstance().token
|
||||||
val secret = LocalData(context).code
|
val secret = LocalData(context).code
|
||||||
val messenger = secret?.let { MessageProcessor(it) }
|
val messenger = secret?.let { MessageProcessor(it) }
|
||||||
|
@ -29,9 +29,9 @@ class CameraXViewModel(application: Application) : AndroidViewModel(application)
|
|||||||
cameraProviderLiveData!!.setValue(cameraProviderFuture.get())
|
cameraProviderLiveData!!.setValue(cameraProviderFuture.get())
|
||||||
} catch (e: ExecutionException) {
|
} catch (e: ExecutionException) {
|
||||||
// Handle any errors (including cancellation) here.
|
// Handle any errors (including cancellation) here.
|
||||||
Log.e(TAG, "Unhandled exception", e)
|
// Log.e(TAG, "Unhandled exception", e)
|
||||||
} catch (e: InterruptedException) {
|
} catch (e: InterruptedException) {
|
||||||
Log.e(TAG, "Unhandled exception", e)
|
// Log.e(TAG, "Unhandled exception", e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ContextCompat.getMainExecutor(getApplication())
|
ContextCompat.getMainExecutor(getApplication())
|
||||||
|
@ -30,7 +30,7 @@ fun NotificationManager.sendNotification(messageBody: String, applicationContext
|
|||||||
// TODO: Step 2.0 add style
|
// TODO: Step 2.0 add style
|
||||||
val eggImage = BitmapFactory.decodeResource(
|
val eggImage = BitmapFactory.decodeResource(
|
||||||
applicationContext.resources,
|
applicationContext.resources,
|
||||||
R.drawable.ic_launcher_foreground
|
R.drawable.ic_stat_name
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: Step 1.2 get an instance of NotificationCompat.Builder
|
// TODO: Step 1.2 get an instance of NotificationCompat.Builder
|
||||||
@ -41,7 +41,7 @@ fun NotificationManager.sendNotification(messageBody: String, applicationContext
|
|||||||
)
|
)
|
||||||
|
|
||||||
// TODO: Step 1.3 set title, text and icon to builder
|
// TODO: Step 1.3 set title, text and icon to builder
|
||||||
.setSmallIcon(R.drawable.ic_launcher_foreground)
|
.setSmallIcon(R.drawable.ic_stat_name)
|
||||||
.setContentTitle(applicationContext
|
.setContentTitle(applicationContext
|
||||||
.getString(R.string.notification_title))
|
.getString(R.string.notification_title))
|
||||||
.setContentText(messageBody)
|
.setContentText(messageBody)
|
||||||
|
@ -26,7 +26,7 @@ class RestSingleton constructor(context: Context){
|
|||||||
}
|
}
|
||||||
|
|
||||||
private val TAG = MainActivity::class.java.simpleName
|
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){
|
fun list(sender: String, callback: (JSONArray) -> Unit){
|
||||||
|
15
app/src/main/res/drawable-anydpi/ic_stat_name.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="#FFFFFF">
|
||||||
|
<group android:scaleX="0.1725"
|
||||||
|
android:scaleY="0.1725"
|
||||||
|
android:translateX="0.96"
|
||||||
|
android:translateY="0.96">
|
||||||
|
<path
|
||||||
|
android:pathData="M53.38,18a12,12 0,0 1,12 12v24.3A9.7,9.7 0,0 0,75 64h0a9.69,9.69 0,0 0,9.66 -9.67L84.8,30a12,12 0,0 1,24 0l-0.94,66.3a12,12 0,0 1,-12 12H31.2a12,12 0,0 1,-12 -12c0,-9.33 8,-7.41 8,-17.58 0,-8.31 -8,-7.87 -8,-16.57 0,-8 8,-8.12 8,-15.81 0.05,-8.12 -8,-9.81 -8,-16.34a12,12 0,0 1,12 -12Z"
|
||||||
|
android:fillColor="#f7941d"/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
BIN
app/src/main/res/drawable-hdpi/ic_stat_name.png
Normal file
After Width: | Height: | Size: 384 B |
BIN
app/src/main/res/drawable-mdpi/ic_stat_name.png
Normal file
After Width: | Height: | Size: 279 B |
@ -1,30 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:aapt="http://schemas.android.com/aapt"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
|
||||||
<aapt:attr name="android:fillColor">
|
|
||||||
<gradient
|
|
||||||
android:endX="85.84757"
|
|
||||||
android:endY="92.4963"
|
|
||||||
android:startX="42.9492"
|
|
||||||
android:startY="49.59793"
|
|
||||||
android:type="linear">
|
|
||||||
<item
|
|
||||||
android:color="#44000000"
|
|
||||||
android:offset="0.0" />
|
|
||||||
<item
|
|
||||||
android:color="#00000000"
|
|
||||||
android:offset="1.0" />
|
|
||||||
</gradient>
|
|
||||||
</aapt:attr>
|
|
||||||
</path>
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFFFFF"
|
|
||||||
android:fillType="nonZero"
|
|
||||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:strokeColor="#00000000" />
|
|
||||||
</vector>
|
|
BIN
app/src/main/res/drawable-xhdpi/ic_stat_name.png
Normal file
After Width: | Height: | Size: 487 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_stat_name.png
Normal file
After Width: | Height: | Size: 686 B |
@ -1,170 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
<path
|
|
||||||
android:fillColor="#3DDC84"
|
|
||||||
android:pathData="M0,0h108v108h-108z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M9,0L9,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,0L19,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M29,0L29,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M39,0L39,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M49,0L49,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M59,0L59,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M69,0L69,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M79,0L79,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M89,0L89,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M99,0L99,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,9L108,9"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,19L108,19"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,29L108,29"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,39L108,39"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,49L108,49"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,59L108,59"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,69L108,69"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,79L108,79"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,89L108,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,99L108,99"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,29L89,29"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,39L89,39"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,49L89,49"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,59L89,59"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,69L89,69"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,79L89,79"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M29,19L29,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M39,19L39,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M49,19L49,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M59,19L59,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M69,19L69,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M79,19L79,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
</vector>
|
|
14
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="108"
|
||||||
|
android:viewportHeight="108">
|
||||||
|
<group android:scaleX="0.3375"
|
||||||
|
android:scaleY="0.3375"
|
||||||
|
android:translateX="32.4"
|
||||||
|
android:translateY="32.4">
|
||||||
|
<path
|
||||||
|
android:pathData="M53.38,18a12,12 0,0 1,12 12v24.3A9.7,9.7 0,0 0,75 64h0a9.69,9.69 0,0 0,9.66 -9.67L84.8,30a12,12 0,0 1,24 0l-0.94,66.3a12,12 0,0 1,-12 12H31.2a12,12 0,0 1,-12 -12c0,-9.33 8,-7.41 8,-17.58 0,-8.31 -8,-7.87 -8,-16.57 0,-8 8,-8.12 8,-15.81 0.05,-8.12 -8,-9.81 -8,-16.34a12,12 0,0 1,12 -12Z"
|
||||||
|
android:fillColor="#f7941d"/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
@ -12,6 +12,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/current_sender"
|
android:text="@string/current_sender"
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="40dp"
|
||||||
|
android:textSize="20sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@ -25,6 +26,7 @@
|
|||||||
android:breakStrategy="balanced"
|
android:breakStrategy="balanced"
|
||||||
android:maxEms="16"
|
android:maxEms="16"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:textSize="18sp"
|
||||||
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@ -56,12 +58,14 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
android:text="@string/scan_sender" />
|
android:text="@string/scan_sender" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button_view"
|
android:id="@+id/button_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/white"
|
||||||
android:text="@string/view_sender" />
|
android:text="@string/view_sender" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 902 B |
Before Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.6 KiB |
@ -2,7 +2,7 @@
|
|||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Theme.BumpForAndroid" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
<style name="Theme.BumpForAndroid" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||||
<!-- Primary brand color. -->
|
<!-- Primary brand color. -->
|
||||||
<item name="colorPrimary">@color/purple_200</item>
|
<item name="colorPrimary">@color/purple_700</item>
|
||||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||||
<item name="colorOnPrimary">@color/black</item>
|
<item name="colorOnPrimary">@color/black</item>
|
||||||
<!-- Secondary brand color. -->
|
<!-- Secondary brand color. -->
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<color name="orange_200">#f7941d</color>
|
||||||
<color name="purple_200">#FFBB86FC</color>
|
<color name="purple_200">#FFBB86FC</color>
|
||||||
<color name="purple_500">#FF6200EE</color>
|
<color name="purple_500">#FF6200EE</color>
|
||||||
<color name="purple_700">#FF3700B3</color>
|
<color name="purple_700">#FF3700B3</color>
|
||||||
|
4
app/src/main/res/values/ic_launcher_background.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#FFFFFF</color>
|
||||||
|
</resources>
|
@ -11,7 +11,7 @@
|
|||||||
<string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
|
<string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
|
||||||
<string name="current_sender">No Sender Added</string>
|
<string name="current_sender">No Sender Added</string>
|
||||||
<string name="scan_sender">Scan</string>
|
<string name="scan_sender">Scan</string>
|
||||||
<string name="camera_fragment_label">Scan new Fragment</string>
|
<string name="camera_fragment_label">Scan Sender QR</string>
|
||||||
<string name="preference_file_key">code_file_key</string>
|
<string name="preference_file_key">code_file_key</string>
|
||||||
<string name="code_key">code_key</string>
|
<string name="code_key">code_key</string>
|
||||||
<string name="notification_title">Bump</string>
|
<string name="notification_title">Bump</string>
|
||||||
|