質問

I have a .vcf file and I want to put it in Android so I can read it from my code. The problem is that I cannot put it into assets folder, because I want to overwrite/edit this file later. How should I do this?

役に立ちましたか?

解決

First since you might want to load it via code, you may need to include the .vcf file in /assets folder just for loading.

Then you can copy the .vcf file to the device's internal or external storage for doing overwrite/edit operation on the fly.

For more information about the internal and external storage, please refer to Android Developers: Storage Options

他のヒント

You can save it in the phone's internal memory using FileOutputStream and next edit it using FileOutputStream too. If you only want to read it, you can use FileInputStrem instead.

You can save the file in the assets folder and when you open the app, save it as I have just said.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top