sd card test

This commit is contained in:
Austin Huang 2020-09-20 22:36:34 -04:00
parent 6425fc3975
commit 3e3c39ae4b
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with 7 additions and 1 deletions

View File

@ -54,6 +54,7 @@ dependencies {
implementation "androidx.constraintlayout:constraintlayout:2.0.1"
implementation "androidx.preference:preference:$preference_version"
implementation 'com.github.hendrawd:StorageUtil:1.1.0'
implementation 'org.jsoup:jsoup:1.13.1'
implementation 'com.facebook.fresco:fresco:2.3.0'

View File

@ -1,6 +1,5 @@
package awais.instagrabber.activities;
import android.annotation.SuppressLint;
import android.app.NotificationChannel;
import android.app.NotificationManager;
@ -40,7 +39,9 @@ import androidx.navigation.ui.NavigationUI;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import hendrawd.storageutil.library.StorageUtil;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -158,6 +159,10 @@ public class MainActivity extends BaseLanguageActivity implements FragmentManage
bindActivityCheckerService();
}
getSupportFragmentManager().addOnBackStackChangedListener(this);
Log.d("austin_debug", "dir: "+Arrays.toString(StorageUtil.getStorageDirectories(getApplicationContext())));
final File sdcard = new File(StorageUtil.getStorageDirectories(getApplicationContext())[0]);
Log.d("austin_debug", "files: "+Arrays.toString(sdcard.listFiles()));
}
@Override