What’s in a filename?

Filenames. Those magical labels we give our documents, our pictures, or other various creations. All filenames consist of two parts: Name.Extension where the Name part is the visible on all computer systems and the .Extension part is sometimes hidden from view. I personally hate computer systems that hide the extension because it allows phishing scammers an easy means to infect a computer by asking the victim to open up a picture called “aVirusPicture.jpg” and people will do so since they know .jpg is just a picture extension… not realizing that the full filename is “aVirusPicture.jpg.exe” because the Operating System has hidden the last “.exe” on them. Continue reading

FileBrowser Send / Receive Intents

Blackmoon File Browser app has grown from a simple browser to a full fledged file manager and able to launch apps based on the given file name so that you don’t have to launch the app and then open the file. Expanding on this idea, FileBrowser grew arms with which to pass off data to other apps in singles or multiples. FileBrowser then grew ears to listen for other apps that wish to use it’s functionality to pick files or folders. Most of these Intents are discoverable, but any good dev knows that getting information directly from the source trumps whatever else is available. In this article, I will specify what Intents FileBrowser uses and how you can use them in your own app. Continue reading

Android: Using Blackmoon File Browser’s MIME type provider

The function I use to translate a filename and given extension into it’s MIME type is available as a Provider in BmFB so that you can use my work for your app too.

    Uri theContentProvider = Uri.parse("content://com.blackmoonit.android.mimetypeprovider/getMIMEtype");
    Uri theContentTypeRequest = Uri.withAppendedPath(theContentProvider, aFile.getName());
    Cursor theTypeResult = managedQuery(theContentTypeRequest, null, null, null, null);
    theTypeResult.moveToFirst();
    if (!theTypeResult.isNull(0)) {
        String theMIMEType = theTypeResult.getString(0);
        ...
    }