diff --git a/app/build.gradle b/app/build.gradle
index 05d6b46c..d41f8a3f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,3 +1,5 @@
+import java.nio.charset.StandardCharsets
+
apply plugin: 'com.android.application'
android {
@@ -10,10 +12,28 @@ android {
versionName project.properties["app.version_name"]
minSdkVersion 16
targetSdk 33
+
+ def getAppName = {
+ def nameArray = project.properties["app.name_byte_array"]
+ def name = project.properties["app.name"]
+ if (name != null && nameArray != null) {
+ throw new Exception("Only define either `app.name` or `app.name_byte_array` in gradle.properties, but not both!")
+ }
+
+ if (name == null) {
+ def nameArraySplit = nameArray.split(",")
+ def nameBytes = new byte[nameArraySplit.length]
+ def count = 0
+ for (String s: nameArraySplit) {
+ nameBytes[count++] = (byte) Integer.parseInt(s)
+ }
+ return new String(nameBytes, StandardCharsets.UTF_8)
+ }
+ return name
+ }
manifestPlaceholders = [
- NAME:project.properties["app.name"],
- ACTIVITY_NAME:project.properties["app.activity_name"],
+ NAME:getAppName(),
ORIENTATION:project.properties["app.orientation"],
]
}
diff --git a/app/src/embed/AndroidManifest.xml b/app/src/embed/AndroidManifest.xml
deleted file mode 100644
index d171f83a..00000000
--- a/app/src/embed/AndroidManifest.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 2f718ea6..eab4ffb3 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -28,7 +28,7 @@
android:label="${NAME}"
android:usesCleartextTraffic="true" >