I am developing an app and I want the photos used in this app to be packed with the apk. The problem is that these photos are downloaded first time when I create the database. In the database I store only location (for example City: Name | Population | Photo Location). Everything works fine but the big problem is that I don't want these downloads to be made at install (it takes 10 minutes because there are a lot of photos), I want to have these photos available at install and be packed with the apk (like the database from assets).
I saw this: Saving and Reading Bitmaps/Images from Internal memory in Android
And currently my photos have been downloaded and are in the /data/user/MY_PACKAGE/imageDir. I don't have any permissions to copy the photos from this folder and if I uninstall the app the photos will be deleted too. And this is not good, I will download the photos with Java and place them manually somewhere, but I don't know where.
My question is where should the photos be placed to have access to them when using the app? And how can I make them download in that folder, without the need of moving the manually?
Related
I’m building a React Native + Expo App for Android.
It’s a product catalog for internal use. I’ll install the App manually on my tablet, there will be no Play Store download for the public.
I want to store the images in the device Gallery, instead of an asset folder within the App itself. In order to be able to manually copy the whole folder connecting the device to my PC, without bundling all the images with the app itself.
I already know how to load an image from the App’s assets.
I also checked expo-image-picker, but I don’t need the user to “pick” images.
I just want to point images in my App to the Device’s Gallery folder.
Any clues welcome!
I am creating an app, the purpose of the app is for you to import copies of photos from your phones gallery and associate info against the photo, such as a description, notes etc.
The info will be stored a a dB with paths to the files. Within the app the user can select different photos, where you'll be taken to a new screen that shows the photo and the saved info below it.
I am unsure what is the best place to store the images on the device. Internal storage or external public storage. The downside of internal would be all images are lost when the app is uninstalled, I'm no sure if a user would expect their photos to be deleted on uninstall? That could make a user very upset if they are important photos to them.
Android seem to be pushing you to store data with the apps own sandbox which is deleted on uninstall with Android 11.
Any advice or thoughts?
I need to install an iOS and Android app built with Appcelerator Alloy which contains a large number of photos (about 200Mb in total). From time to time the user will be able to download new photos from a remote server, but only at the rate of about 10Mb each time.
I have built the app and it works fine using the Resources directory, but I now realise this can only be read (not deleted or updated) by the app on devices. I am not clear about where in the project filesystem I should put the photo files so that they will be in the ApplicationDataDirectory when the app is installed. Do I need to somehow move/copy all the data from the resources directory into the ApplicationDataDirectory at build time? Seems a bit long-winded....
Sorry a bit of a long question, but can't find an answer anywhere!
Any help or advice much appreciated.
In my case I'm using applicationDataDirectory.
I've a lot of pictures, at the download time, in order to the device don't run out of memory, after downloading the image file, wait one second and goes to the next one, every time that I download those images, I'm deleting the old ones.
Delete old ones and its folder, create a new folder:
var path = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,'products');
if(path.exists()) path.deleteDirectory(true);
path.createDirectory();
After downloading the image:
Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,'products'),'image.png').write(this.responseData);
I'm developing an air image viewing application for Windows and Android that will allow some special users to import bitmaps to it. The user can click on a button, browse to a bitmap stored locally and then the app saves the image to the documentsDirectory.
Later on, other users (let's call then common users) will get this already compiled app and view the images imported by the special users.
My question is how can I make the app save the images within it without recompiling it?
Any ideas are welcome! Thank you all!
The only option I can think of, is to make a web server to store and load the images by those users. That's because the images will be stored in the documents or cache directory of the device which means that there is no automatic way to bring them to other devices.
You need a web server that the images will be uploaded and saved, and later on retrieved by other clients. It's called centralized assets system.
I am working on project which contains large number of data in assets folder, its around 1GB .When I'm going to make the apk file from eclipse to AndroidTools>Export Sign Package it's showing me ProjectName/bin/project.apk does not exist. When I remove some data from assets and make it around 200MB then it lets me to build the apk file.
So I have to find another alternative to deal with large data to parse from server, but in the iphone it support to store such large data so I wondered if there is any trick to deal with large data in android, locally.
If android doesn't support this size then please post your opinion, should google team consider this kind of problem (in other words its about security reason ??)
If your aim to use a large data through application then you have two way to do that .
1: Download from server and store in your SD card .
2: You said your project is not going to upload on android market . if this would be a case then simply ask those user to save that data in some specific folder on SD card and your app will use from there .
There is no way to store 1GB data in APK file .