开发者

How can i Use External Storage in android

开发者 https://www.devze.com 2023-01-13 21:09 出处:网络
This is for the first time i am using external storage in android. I need some help how can i perform different operations such as how to check whether External Storage is available or not?, How to wr

This is for the first time i am using external storage in android. I need some help how can i perform different operations such as how to check whether External Storage is available or not?, How to write files or pictures into开发者_JAVA百科 storage .


To clarify the first part of CommonsWare's answer (I couldn't seem to add a comment to the comment stream): you want to check that...

Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);

... is true.


how to check whether External Storage is available or not?

Use Environment.getExternalStorageState().

How to write files or pictures into storage

Use standard Java I/O, working off a directory built using Environment.getExternalStorageDirectory().

0

精彩评论

暂无评论...
验证码 换一张
取 消