diff --git a/app/build.gradle b/app/build.gradle index 49bd6a9..9b705ec 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,7 +8,7 @@ android { compileSdkVersion 28 defaultConfig { applicationId "com.omegar.simple.omegalaunchers" - minSdkVersion 16 + minSdkVersion 14 targetSdkVersion 28 versionCode 1 versionName "1.0" diff --git a/omegalauncherslib/build.gradle b/omegalauncherslib/build.gradle index 167df5f..7907375 100644 --- a/omegalauncherslib/build.gradle +++ b/omegalauncherslib/build.gradle @@ -7,7 +7,7 @@ android { defaultConfig { - minSdkVersion 16 + minSdkVersion 14 targetSdkVersion 28 versionCode 1 versionName "1.0" diff --git a/omegalauncherslib/src/main/java/com/omegar/libs/omegalaunchers/ActivityLauncher.kt b/omegalauncherslib/src/main/java/com/omegar/libs/omegalaunchers/ActivityLauncher.kt index d5536dd..68d89fb 100644 --- a/omegalauncherslib/src/main/java/com/omegar/libs/omegalaunchers/ActivityLauncher.kt +++ b/omegalauncherslib/src/main/java/com/omegar/libs/omegalaunchers/ActivityLauncher.kt @@ -4,6 +4,7 @@ import android.app.Activity import android.app.PendingIntent import android.content.Context import android.content.Intent +import android.os.Build import android.os.Bundle import android.os.Parcelable import android.util.AndroidRuntimeException @@ -86,7 +87,11 @@ class ActivityLauncher( } private fun Activity.compatStartActivityForResult(intent: Intent, requestCode: Int, option: Bundle? = null) { - startActivityForResult(intent, requestCode, option) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + startActivityForResult(intent, requestCode, option) + } else { + startActivityForResult(intent, requestCode) + } } fun getPendingIntent(