1

I am working on this project where i have to save some text, picture, video or a soundclip to the database which should have the capability of being sent to others by bluetooth.

I know how to create a data base with the text and tables.

  1. How do i add a photo, or a video, or a sound clip to the database. is it by adding the address of the file?
  2. where is the database created/stored, by what name and what type (pardon me by i don't have much idea about SQLite)?
  3. can i share the database with other android users, if yes then how?

Thanks for the help guys !!

1 Answer 1

2
  1. It would be better to add the path to the photo/video/sound clip. You can save the absolute path then re-create it using a File object, or save the Uri path.

  2. http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html I would store them as a varchar since they will be string

  3. What do you mean by sharing the database with other users? The actual .db file? Or the contents in the database?

Sign up to request clarification or add additional context in comments.

3 Comments

i was thinking more like making a txt file out of databse and then sending it via bluetooth
Then yes, you can write a txt file using Java. You would just have to loop through the database, get the values, then write to the file in the format you want.
You can store it anywhere, in the app directory, or the phones SD cards. If you want to write to the SD card, you need the permission <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />. Just make use the File object to create and write to the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.