Fixed service not starting after asking for permissions

This commit is contained in:
Mathieu 2021-10-14 22:03:17 +02:00
parent d488d4e975
commit 3caee5d422

View File

@ -42,11 +42,11 @@ public class Main extends AppCompatActivity {
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
if (!hasPermissions()) { if (!hasPermissions()) {
Toast.makeText(this, "No pemerssions, accept all permissions and restart app.", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "Missing permissions, accept all permissions and restart app.", Toast.LENGTH_SHORT).show();
requestPermissions(); requestPermissions();
} else {
startService();
} }
startService();
} }
} }