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 {
|
||||
applicationId = "dev.amizing25.robinsr"
|
||||
minSdk = 24
|
||||
minSdk = 30
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
@@ -59,6 +59,8 @@ tasks.register<Exec>("buildRust") {
|
||||
"cargo", "ndk",
|
||||
"-t", "arm64-v8a",
|
||||
"-t", "armeabi-v7a",
|
||||
"-t", "x86",
|
||||
"-t", "x86_64",
|
||||
"-o", "../jniLibs",
|
||||
"build", "--release"
|
||||
)
|
||||
|
||||
@@ -153,22 +153,20 @@ class MainActivity : AppCompatActivity() {
|
||||
/// Notification channel ///
|
||||
|
||||
private fun createNotificationChannel() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
val channel = NotificationChannel(
|
||||
RustService.CHANNEL_ID,
|
||||
"Service Channel",
|
||||
NotificationManager.IMPORTANCE_LOW
|
||||
).apply {
|
||||
description = "Background service notifications"
|
||||
lockscreenVisibility = Notification.VISIBILITY_PUBLIC
|
||||
setSound(null, null)
|
||||
enableLights(false)
|
||||
enableVibration(false)
|
||||
}
|
||||
|
||||
val manager = getSystemService(NotificationManager::class.java)
|
||||
manager.createNotificationChannel(channel)
|
||||
val channel = NotificationChannel(
|
||||
RustService.CHANNEL_ID,
|
||||
"Service Channel",
|
||||
NotificationManager.IMPORTANCE_LOW
|
||||
).apply {
|
||||
description = "Background service notifications"
|
||||
lockscreenVisibility = Notification.VISIBILITY_PUBLIC
|
||||
setSound(null, null)
|
||||
enableLights(false)
|
||||
enableVibration(false)
|
||||
}
|
||||
|
||||
val manager = getSystemService(NotificationManager::class.java)
|
||||
manager.createNotificationChannel(channel)
|
||||
}
|
||||
|
||||
/// Permission stuff ///
|
||||
@@ -294,13 +292,17 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
fun writeJsonIfNotExist(context: Context, dst: File, src: Int) {
|
||||
if (!dst.exists()) {
|
||||
context.resources.openRawResource(src).use { input ->
|
||||
dst.outputStream().use { output ->
|
||||
input.copyTo(output)
|
||||
LogRepository.addLog("wrote $dst into media directory")
|
||||
try {
|
||||
if (!dst.exists()) {
|
||||
context.resources.openRawResource(src).use { input ->
|
||||
dst.outputStream().use { output ->
|
||||
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