feat: increase min api level & add x86 support
This commit is contained in:
8
.idea/compiler.xml
generated
Normal file
8
.idea/compiler.xml
generated
Normal 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>
|
||||||
@@ -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"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -153,22 +153,20 @@ 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",
|
NotificationManager.IMPORTANCE_LOW
|
||||||
NotificationManager.IMPORTANCE_LOW
|
).apply {
|
||||||
).apply {
|
description = "Background service notifications"
|
||||||
description = "Background service notifications"
|
lockscreenVisibility = Notification.VISIBILITY_PUBLIC
|
||||||
lockscreenVisibility = Notification.VISIBILITY_PUBLIC
|
setSound(null, null)
|
||||||
setSound(null, null)
|
enableLights(false)
|
||||||
enableLights(false)
|
enableVibration(false)
|
||||||
enableVibration(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
val manager = getSystemService(NotificationManager::class.java)
|
|
||||||
manager.createNotificationChannel(channel)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val manager = getSystemService(NotificationManager::class.java)
|
||||||
|
manager.createNotificationChannel(channel)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Permission stuff ///
|
/// Permission stuff ///
|
||||||
@@ -294,13 +292,17 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun writeJsonIfNotExist(context: Context, dst: File, src: Int) {
|
fun writeJsonIfNotExist(context: Context, dst: File, src: Int) {
|
||||||
if (!dst.exists()) {
|
try {
|
||||||
context.resources.openRawResource(src).use { input ->
|
if (!dst.exists()) {
|
||||||
dst.outputStream().use { output ->
|
context.resources.openRawResource(src).use { input ->
|
||||||
input.copyTo(output)
|
dst.outputStream().use { output ->
|
||||||
LogRepository.addLog("wrote $dst into media directory")
|
input.copyTo(output)
|
||||||
|
LogRepository.addLog("wrote $dst into media directory")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch(e: Exception) {
|
||||||
|
LogRepository.addLog(e.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIN
app/src/main/jniLibs/x86/librobinsr.so
Normal file
BIN
app/src/main/jniLibs/x86/librobinsr.so
Normal file
Binary file not shown.
BIN
app/src/main/jniLibs/x86_64/librobinsr.so
Normal file
BIN
app/src/main/jniLibs/x86_64/librobinsr.so
Normal file
Binary file not shown.
Reference in New Issue
Block a user