Android 6.0 Marshmallow introduces a new file manager called File Explorer. File Explorer is a great way to manage your files and folders on Android. To use File Explorer, you first need to install the Android SDK and the Android Runtime. Then, you can create a new project and add the following code to it: package com.example; import android.os.Bundle; import android.support.v4.app.AppCompatActivity; import android.support.v4.content.*; public class MainActivity extends AppCompatActivity { private static final int ROW_COUNT = 10; private static final int WIDTH = 600; @Override protected void onCreate(Bundle savedInstanceState) { super(); setContentView(ROW_COUNT + " rows" ); } @Override protected void onCreateOptionsMenu(Menu menu) { // In order to use the file manager, you must enable Storage in your app’s settings // (see below) if (!this .settings .storage) { // The file manager will not work if there is no storage available for it // Set this to true so that it will try to find an appropriate storage provider } else { // The file manager will work fine if there is storage available but you have not enabled Storage yet } } @Override protected void onOptionsItemSelected(MenuItem item) { super .onOptionsItemSelected(item); setStorageEnabled(); } /** * Called when an activity starts up / public void onStart() { super .onStart(); this .fileManager = new File Explorer(); this .fileManager .enableFileSync(); this .fileManager .openFile("/Users/username/Desktop/myfile"); } /* * Called when an activity ends / public void onEnd() {} /* * Called when an activity is killed / public boolean onDestroy() {} /* * Returns true if the user has successfully opened or closed a file */
Android includes full access to a file system, complete with support for removable SD cards. But Android itself has never come with a built-in file manager, forcing manufacturers to create their own file manager apps and users to install third-party ones. With Android 6.0, Android now contains a hidden file manager.
The file manager doesn’t have its own icon in the app drawer, as Google still wants to hide the file system from most people. But the file manager allows you to browse, delete, search, open, share, copy, and do everything else you’d want to do with your files.
Access Android 6.0’s Hidden File Manager
To access this File Manager, open Android’s Settings app from the app drawer. Tap “Storage & USB” under the Device category.
RELATED: Five Ways to Free Up Space on Your Android Device
This takes you to Android’s storage manager, which helps you free up space on your Android device. Android provides a visual overview of how much space you’ve used on your device and break it down into categories like Apps, Images, Video, Audio, and Other. If you have multiple user accounts configured on your device, Android will show you how much data each user account is using.
Tap a category to see what’s using space and choose what to remove — for example, tapping “Apps” will show you a list of your installed apps with the largest apps first.
To access the file manager, scroll down to the bottom of this list and tap the “Explore” option.
RELATED: How to Manage Files and Use the File System on Android
This will take you to an interface that allows you to view and browse your device’s internal storage or external SD card storage. Android is actually presenting the file system here — the same file system you’ll see in third-party file management apps. Of course, you can’t access the full root file system without a third-party file manager and root permissions.
How to Use Android’s Built-in File Manager
Here’s what you can do from here:
Browse the file system: Tap a folder to enter it and view its contents. To go back up, tap the folder’s name at the top-left corner of the screen and tap one of the parent folders. Open files: Tap a file to open it in an associated app, if you have an app that can open files of that type on your Android device. For example, you could tap Downloads to view your downloads and tap a PDF file to open it in your default PDF viewer. Select one or more files: Long-press a file or folder to select it. Tap files or folders to select or deselect them after doing so. Tap the menu button after selecting a file and tap “Select all” to select all files in the current view.
Share one or more files to an app: After selecting one or more files, tap the Share button to send them to an app. For example, you could share them to Dropbox or Google Drive to upload them to a cloud storage service. Delete one or more files: Tap the trash can icon to delete one or more selected files. Copy files to another folder: Tap the menu button and select “Copy to” to copy the selected files or folders to another folder. From here, you can tap the menu button and select “Show internal storage” to see your device’s internal storage and copy it to any folder you like. There will be a “New folder” button here, allowing you to create new folders on your internal storage. Android doesn’t seem to have a way to “move” files — you’ll just have to copy them to a new location and delete the originals to move them.
Search for files: Tap the magnifying glass icon at the top-right corner of the screen to search for files on your Android device’s storage. Choose between list and grid view: Tap the menu button and select either “Grid view” or “List view” to toggle between the two. Choose how to sort the files: Tap the sort button at the top-right corner of the screen and select “By name,” “By date modified,” or “By size” to sort the files.
The built-in file manager is minimal and barebones, but it has all the basic features you’ll need — unless you need to access network storage locations or gain access to the root file system, which are more advanced features better left to third-party apps.
You can also tap the menu button whenever you see Android’s “Save To” interface and select “Show internal storage” to see your device’s file system, saving files wherever you want to save them.