ssk
ssk

Reputation: 9255

External Storage on android

I have an application that creates a log file on external device and passes the log file path to the underlying ndk library for logging.

I am using Environment.MEDIA_MOUNTED.equals(state) before creating the log file to check whether the external storage is available for logging. My question is what will happen if the user mounts the device onto a computer after creating the log file?

Would my application still be able to access the log file?

Upvotes: 0

Views: 294

Answers (1)

Qben
Qben

Reputation: 2623

As Drake said in his comment, when you attach the phone to a computer and choose to mount it as a drive the external storage will become unavailable to the phone. I guess you read it but it's described here.

Upvotes: 3

Related Questions