문제

My app collects data which it stores in arrays, and I need to be able to access the data from outside the app. The tablet I am using has no SD card, so I'm thinking the best way to transfer data would be to save to 'external' system memory. I have found tutorials to save data on internal storage and for specific data types like pictures onto SD cards, but I can't figure out how to write an arbitrary file to an arbitrary location. Thanks.

도움이 되었습니까?

해결책

This sounds like a perfect time to use a SQLite database. Android comes with SQLite support built in so its easy to set up. You can just create a database and store your array data there (you can even store pictures too as a byte[]). There are a number of tutorials that show how to do this. Here is 1 and 2. It should be pretty easy from there.

다른 팁

I'm not sure that you can write to an arbitrary place on the Android system. You could write to a file in /data/data// and then email that file to yourself.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top