Fixed service not starting after asking for permissions
This commit is contained in:
parent
d488d4e975
commit
3caee5d422
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user