Hi people, I'm developing and an application that uses a sqlite database, and I'm having trouble to store images in database, I read a lot of examples, but not working here, can someone tell me the best way to store images in SQLite?
(and then I'll need to store movies as well..)
EDIT: In the future I'll have to develop a backoffice so the company can add/change/delete items in the db.
Thanks!
Would it not make more sense to store the images on the SD card and store a path to the image in the database?
alostpacket said:
Would it not make more sense to store the images on the SD card and store a path to the image in the database?
Click to expand...
Click to collapse
I've been seaching and now I know that is not good to store images in SQLite, but in SDcard is still bad because it will be acessed by user.. I think I want to store them in internal memory, private to the app, but I don't know how to.. if some one could help me it wold be great!
batista16 said:
I've been seaching and now I know that is not good to store images in SQLite, but in SDcard is still bad because it will be acessed by user.. I think I want to store them in internal memory, private to the app, but I don't know how to.. if some one could help me it wold be great!
Click to expand...
Click to collapse
You can store images in your database easily, by storing their data as a byte[]. Create your table with a BLOB column, then read the image as a byte[] and use ContentValues class with method put(String name, byte[] value), and finally SQLiteDatabase.insert(ContentValues values).
Related
I mean, i installed splashid and i'm not able to find the related vid file that usually create the app.
Thank a lot.
Not familiar with splashid but most app created data (such as sound recordings, videos, pics, downloads, etc..) are placed on your SD card.
sepulcrio said:
I mean, i installed splashid and i'm not able to find the related vid file that usually create the app.
Click to expand...
Click to collapse
I would try it out myself, but it costs $9.95. So I can only offer two possible scenarios:
1) If you're asking where an application might save a media file: normally this is on the SDcard, in a subdirectory relating to the app's name, So it could be /sdcard/splashid/myfile.3gp.
2) If you're asking where an app keeps its internal data, such as where SplashID stores passwords, it could be the phone's internal memory. I'm guessing here, but it might be somewhere like /data/data/com.splashdata.pro. Unfortunately, you won't be able to access this folder or its files unless you have root.
Hope this helps!
Not sure if this has been posted elsewhere. I couldn't see it anywhere.
Does anyone know the best way to redirect the Documents, Pictures on phone etc to the storage card?
Can it be done within Advanced Config. And if so, does anyone know if it sticks?
you can tell the camera to store the photos on the storage card. I haven't figured out more yet, would like to know how to change the default folder for bt recieved files or opera downloads e.g.
Pictures to storage card
Within the camera/settings, there is a menu with 6 options. Pressing the storage icon toggles between saving to card, and device.
Other apps let you choose where to store file. Notes & email.
You can store all your audio and image files on the SD and sense will find them.
Many apps can be installed on the sd.
TomTom & Copilot install maps on the sd.
At 100meg they are too big for most mobile memories, though the HD2 could handle it.
madindehead said:
Not sure if this has been posted elsewhere. I couldn't see it anywhere.
Does anyone know the best way to redirect the Documents, Pictures on phone etc to the storage card?
Can it be done within Advanced Config. And if so, does anyone know if it sticks?
Click to expand...
Click to collapse
Okay. I have some important PDF files that I need to carry in my phone and I really want to keep them private. I have searched in the market for the application to hide the files, but it turns out that all those applications only provides us the way to hide only Pictures and Videos, which is obviously more demanding and so called private data.
My concern is, no matter how I store these documents, Adobe Reader always and always finds them and displays them. I don't know what's wrong with Adobe and why it is searching for all PDF documents in the SD card and displaying it to public.
I have made the following file/folder structures to make the files not to appear in the Adobe Reader, but failed every time. Adobe just find them somehow.
.folder/file.pdf
.folder/.folder1/file.pdf
.file.pdf
.folder/.file.pdf
.folder/.folder1/.file.pdf
I also have tried all above combinations by applying hidden and system attributes to the PDF files and those folders. But as its Linux, I failed.
So I did some research and though I'll just disallow adobe from accessing things, but when I went to security thing, it told me Adobe don't need anything.
Then why it is searching for my PDF files.
There is a way and only way to hide those files from Adobe is to change their extension to XPS ( ), but it isn't feasible and not something I'm looking for.
Kindly assist me. Thanks.
Couldn't you just password protect them?
Although not as convenient you could use a separate micro sd? Or you could use a cloud system like dropbox.
you can use an application like app protector to password protect the adobe reader. though ur files will be displayed in adobe reader but adobe reader itself would require a password\pattern to open.
Sent from my HTC Wildfire using XDA App
Thanks a lot guys
joningi said:
Couldn't you just password protect them?
Click to expand...
Click to collapse
The files are already secured and there's no way to edit them without knowing the password of those secured documents. And applying password protection to every single file isn't a feasible solution. Though it's a good answer, it's not a solution. Life would have been easier if Adobe would just have allowed users to browse directories and open files instead of listing thousands of PDF files in the system.
djdevine2 said:
Although not as convenient you could use a separate micro sd? Or you could use a cloud system like dropbox.
Click to expand...
Click to collapse
Yes, separate micro SD card is not the convenient way as I bough the 16GB card just to have everything in single place. I even dumped my iPod Touch, because I'm considering my Wildfire to all in device. And about dropbox, correct me if I'm wrong, but it needs Internet connection every time you want to see the file, exception of cached file. May be I'm expecting too much, but my provider don't support the 3G in my area, so GPRS internet isn't something I can rely on.
maaz_obaid said:
you can use an application like app protector to password protect the adobe reader. though ur files will be displayed in adobe reader but adobe reader itself would require a password\pattern to open.
Sent from my HTC Wildfire using XDA App
Click to expand...
Click to collapse
Now that's a solution. I've tried the application just now and it looks promising. Thanks a lot for providing the solution, it's easier to get rid of Adobe instead of hiding files.
after applying the command, like writing . in renaming u have to restart ur cell , nd then ur reader will not find that. without restart it holds the path already so it able to find even u hide them. or dnt want to restart then install e.s security. thats gud
meetmenow007 said:
after applying the command, like writing . in renaming u have to restart ur cell , nd then ur reader will not find that. without restart it holds the path already so it able to find even u hide them. or dnt want to restart then install e.s security. thats gud
Click to expand...
Click to collapse
Even after restart, Adobe Reader just finds the files somehow and shows all of them. I'm using the App Protector now and its working fine. But few hours ago found E S Security in the market and installed it on my phone. I still needs to have a look at it. Thanks for the note mate, will be helpful for other applications.
Why Security-Through-Obscurity Won't Work
I'd rather try encrypting the files and/or not use FAT16/32 filesystem as it provides no security whatsoever
Maybe repartition your card to use a ext3/ext4 partition with user rights and encryption if those data are important to you.
I am developing a graphical password for android phones. After clicking on certain points on an image, the pixel positions should get stored in the internal memory of the phone or in a file, so that next time the user signs in, the values that the user puts can be compared with stored values. The values stored should not get erased. How do i go about this? Any function? ( Developing in eclipse)
You 'll find your way through surface view and open gl es it can provide x y cordinates of piont of touch see developer.android.com
Sent from my GT-S5302 using Tapatalk 2
Welcome to XDA!
malinis said:
I am developing a graphical password for android phones. After clicking on certain points on an image, the pixel positions should get stored in the internal memory of the phone or in a file, so that next time the user signs in, the values that the user puts can be compared with stored values. The values stored should not get erased. How do i go about this? Any function? ( Developing in eclipse)
Click to expand...
Click to collapse
First of all, welcome to XDA!
Second, you may want to take a look at http://developer.android.com/guide/topics/data/data-storage.html. I do not recommend writing the coordinates to a file on the internal/external storage of a phone (unless encrypted somehow) because anyone could easily look at it. Hope this helps!
Thanks all. I used sqlite / database handler.. helped me
malinis said:
Thanks all. I used sqlite / database handler.. helped me
Click to expand...
Click to collapse
So you put the coordinates into a database?
Well, you can also look up all values from a sqlite database: https://play.google.com/store/apps/details?id=dk.andsen.asqlitemanager
Encrypt them.
yeah..put them in database, once u pull the file from the device, i can read it using the sqlite browser.. Its working fine for the application. Encryption yet to be done. Just a novice
malinis said:
yeah..put them in database, once u pull the file from the device, i can read it using the sqlite browser.. Its working fine for the application. Encryption yet to be done. Just a novice
Click to expand...
Click to collapse
I think that encryption is important. Check this: http://stackoverflow.com/questions/2430412/what-java-library-should-i-use-for-cryptography
Enjoy learning.
yes it is.. thanks for that!
I can save a file to the SD card very easily. But then when I hit "move to private", it goes in the internal storage. Since the S7 doesn't support Marshmallow's storage feature, there are a limited number of games and such that you can move to the SD card. While it isn't a problem now, the 32GB of internal storage can be used up rather quickly. So is there a way to make it so I can make something on my SD card private without moving it to internal so that it doesn't take up space? Thanks.
There is one way if you wanna try a different file browser. Try File Commander on the Play Store. There is a hide apps switch which is password protected and you can hide ANY file at all, singular or multiple files that you choose. I use it and it's great.
krico said:
There is one way if you wanna try a different file browser. Try File Commander on the Play Store. There is a hide apps switch which is password protected and you can hide ANY file at all, singular or multiple files that you choose. I use it and it's great.
Click to expand...
Click to collapse
Hey, that did not work for me. It wouldn't recognize any files that I had saved on my SDCard. I found a different, easier way to do it, though. Thanks for your help!
PDE5 Inhib said:
Hey, that did not work for me. It wouldn't recognize any files that I had saved on my SDCard. I found a different, easier way to do it, though. Thanks for your help!
Click to expand...
Click to collapse
Share please
Shuthefrontdoor said:
Share please
Click to expand...
Click to collapse
I made some huge long post about it with pictures so that people who aren't good at all with phones could easily search google and find it. But it wouldn't allow me to link imgur pics since I'm new. And I can't figure out how to add pics from computer. So I couldn't post it.
Easy Mode:
Go to "my files"
Put all the pics/whatever you want hidden in it's own folder.
Rename that folder whatever you want (something dumb like "simdata" or something will give a lil more privacy with it).
Put a "." at the beginning of the file name. This tells your phone to hide it.
Now it will be hidden. Of course, this isn't the same since the file is just hidden. If someone wanted to, they could search your phone, go to your files app, and hit "show hidden content". But, it does work great for hiding pics of your gf's tits if your mom wants to look at your pictures from a recent trip. And it won't take up space on the internal storage to do it. If you want to unhide the content, just go to the same files app, hit "show hidden content" and then "rename" with removing the "." from it.
Alternatively, create a folder on SD and in that folder create a file called .nomedia
Now any pics/vids you move to that folder will be hidden from Photos app
Is there anyway of recovering files that where made private? Reason being my device now fails to reanable private mode...
Sent from my SM-G935F using XDA-Developers mobile app