diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index d3d7249..cfec25d 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -4,6 +4,8 @@
package="com.simplemobiletools.voicerecorder"
android:installLocation="auto">
+
+
diff --git a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt
index ed46e23..e565908 100644
--- a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/activities/MainActivity.kt
@@ -5,6 +5,8 @@ import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import com.simplemobiletools.commons.extensions.appLaunched
+import com.simplemobiletools.commons.extensions.checkAppSideloading
+import com.simplemobiletools.commons.helpers.PERMISSION_RECORD_AUDIO
import com.simplemobiletools.commons.models.FAQItem
import com.simplemobiletools.voicerecorder.BuildConfig
import com.simplemobiletools.voicerecorder.R
@@ -14,6 +16,18 @@ class MainActivity : SimpleActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
appLaunched(BuildConfig.APPLICATION_ID)
+
+ if (checkAppSideloading()) {
+ return
+ }
+
+ handlePermission(PERMISSION_RECORD_AUDIO) {
+ if (it) {
+ initVoiceRecorder()
+ } else {
+ finish()
+ }
+ }
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
@@ -30,6 +44,10 @@ class MainActivity : SimpleActivity() {
return true
}
+ private fun initVoiceRecorder() {
+
+ }
+
private fun launchSettings() {
startActivity(Intent(applicationContext, SettingsActivity::class.java))
}