diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml new file mode 100644 index 0000000..0c0c338 --- /dev/null +++ b/.idea/deploymentTargetDropDown.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index f01eec3..0897082 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,15 +4,15 @@ diff --git a/.idea/kotlinScripting.xml b/.idea/kotlinScripting.xml deleted file mode 100644 index 26da98e..0000000 --- a/.idea/kotlinScripting.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - 2147483647 - - - \ No newline at end of file diff --git a/.idea/migrations.xml b/.idea/migrations.xml new file mode 100644 index 0000000..f8051a6 --- /dev/null +++ b/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/java/app/waste2wealth/com/MainActivity.kt b/app/src/main/java/app/waste2wealth/com/MainActivity.kt index 0e4e1f0..b0e8c03 100644 --- a/app/src/main/java/app/waste2wealth/com/MainActivity.kt +++ b/app/src/main/java/app/waste2wealth/com/MainActivity.kt @@ -4,6 +4,7 @@ import android.Manifest import android.annotation.SuppressLint import android.content.Intent import android.content.IntentFilter +import android.os.Build import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent @@ -136,7 +137,11 @@ class MainActivity : ComponentActivity() { override fun onFailure() {} } val intentFilter = IntentFilter(SmsRetriever.SMS_RETRIEVED_ACTION) - registerReceiver(smsBroadcastReceiver, intentFilter) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + registerReceiver(smsBroadcastReceiver, intentFilter, RECEIVER_EXPORTED) + } else { + registerReceiver(smsBroadcastReceiver, intentFilter) + } }