Android: Get storage permissions before populating game list

This commit is contained in:
Connor McLaughlin 2019-12-04 21:54:35 +10:00
parent 8c33163ef1
commit 737bec0e7d
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,9 @@ public class MainActivity extends AppCompatActivity {
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (!checkForExternalStoragePermissions())
return;
Intent i = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
i.addCategory(Intent.CATEGORY_DEFAULT);
i.putExtra(Intent.EXTRA_LOCAL_ONLY, true);