feat: increase min api level & add x86 support

This commit is contained in:
amizing25
2025-03-09 10:23:28 +07:00
parent b7024bb598
commit 37a6d97730
5 changed files with 33 additions and 21 deletions

8
.idea/compiler.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel>
<module name="My_Application.app" target="21" />
</bytecodeTargetLevel>
</component>
</project>

View File

@@ -9,7 +9,7 @@ android {
defaultConfig { defaultConfig {
applicationId = "dev.amizing25.robinsr" applicationId = "dev.amizing25.robinsr"
minSdk = 24 minSdk = 30
targetSdk = 35 targetSdk = 35
versionCode = 1 versionCode = 1
versionName = "1.0" versionName = "1.0"
@@ -59,6 +59,8 @@ tasks.register<Exec>("buildRust") {
"cargo", "ndk", "cargo", "ndk",
"-t", "arm64-v8a", "-t", "arm64-v8a",
"-t", "armeabi-v7a", "-t", "armeabi-v7a",
"-t", "x86",
"-t", "x86_64",
"-o", "../jniLibs", "-o", "../jniLibs",
"build", "--release" "build", "--release"
) )

View File

@@ -153,7 +153,6 @@ class MainActivity : AppCompatActivity() {
/// Notification channel /// /// Notification channel ///
private fun createNotificationChannel() { private fun createNotificationChannel() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel = NotificationChannel( val channel = NotificationChannel(
RustService.CHANNEL_ID, RustService.CHANNEL_ID,
"Service Channel", "Service Channel",
@@ -169,7 +168,6 @@ class MainActivity : AppCompatActivity() {
val manager = getSystemService(NotificationManager::class.java) val manager = getSystemService(NotificationManager::class.java)
manager.createNotificationChannel(channel) manager.createNotificationChannel(channel)
} }
}
/// Permission stuff /// /// Permission stuff ///
@@ -294,6 +292,7 @@ class MainActivity : AppCompatActivity() {
} }
fun writeJsonIfNotExist(context: Context, dst: File, src: Int) { fun writeJsonIfNotExist(context: Context, dst: File, src: Int) {
try {
if (!dst.exists()) { if (!dst.exists()) {
context.resources.openRawResource(src).use { input -> context.resources.openRawResource(src).use { input ->
dst.outputStream().use { output -> dst.outputStream().use { output ->
@@ -302,5 +301,8 @@ class MainActivity : AppCompatActivity() {
} }
} }
} }
} catch(e: Exception) {
LogRepository.addLog(e.toString())
}
} }
} }

Binary file not shown.

Binary file not shown.