Neo710
Neo710

Reputation: 105

How to get SD card events?

I'm building an app that monitors phone usage. I need to implement an SQLite db that is necessary for the application running.

Because not all devices have an eMMC, I need to check if the device have the eMMC and if not I need to check if an SD card is available. (If an eMMC is not present, the only other place where blackberry let me put the db is the SD card).

I need to know how to check if the SD card is present and how many free space it has and then I need to implement a "listener" to check hot SD removal event and similar.

Someone can help?

Thanks.

Upvotes: 1

Views: 147

Answers (1)

Michael Donohue
Michael Donohue

Reputation: 11876

FileSystemRegistry has a static method where you can add a custom FileSystemListener implementation. This will let you know when the SD card is added or removed.

Upvotes: 1

Related Questions