adba
adba

Reputation: 497

Saving a File into a Proper Location in Android

I need to programmatically save a bitmap file produced by my application into a directory. The user will be able to take it from its location via regular file explorers. Which way should I follow to determine a location for it?

For example:

  1. Check the external sd card
  2. If the external card exists, then save it there
  3. If not, then save it in the internal memory

Thanks.

Upvotes: 0

Views: 87

Answers (1)

Bhanu Sharma
Bhanu Sharma

Reputation: 5145

Environment.getExternalStorageState();

This wili give you primary memory dir root path of your mobile so from this u can set your file root oath or directory

Upvotes: 1

Related Questions