Android Wear: how to store image data into watch

一曲冷凌霜 提交于 2019-12-04 13:30:06

I believe you are having problems because openFileInput() is for internal storage, not external storage. In fact there is no reason for using Environment.getExternalStorage(). I don't believe the watches have external storage anyway.

Try something like openFileOutput("test.jpg", Context.MODE_WORLD_READABLE); (fyi MODE_WORLD_READABLE is deprecated).

Then use openFileInput("test.jpg") to get it back.

The reason you are getting an error is openFileOutput() cannot have subdirectories.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!