fix(android): adjust for Kotlin and project warnings

Committed via a GitHub action: https://github.com/tauri-apps/plugins-workspace/actions/runs/9307017436

Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
This commit is contained in:
Lucas Nogueira
2024-05-30 17:56:57 +00:00
committed by tauri-bot
parent f3587d6852
commit 6f0d9d6199
2 changed files with 2 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ android {
compileSdk = 34
defaultConfig {
minSdk = 19
minSdk = 24
targetSdk = 34
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -21,7 +21,7 @@ class ShellPlugin(private val activity: Activity) : Plugin(activity) {
val url = invoke.parseArgs(String::class.java)
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
activity?.applicationContext?.startActivity(intent)
activity.applicationContext?.startActivity(intent)
invoke.resolve()
} catch (ex: Exception) {
invoke.reject(ex.message)