Distribute air apps without recompiling - android

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.

Related

Create "virtual files" in android. Possible?

I want to add a functionality to my app to treat a user's uploaded images online as if they were files on their phone, so all their existing apps can find their images without needing to download them all. Basically tricking the phone into thinking its local instead of online. Any thoughts and how to go about this?

how can i keep a folder in my mobile storage and a folder in my dropbox space in Sync?

i have developed a android app for farmers. it is a informative app for indian farmer.The users will be sending me the images and video files to me through my app. here i used (integrated) dropbox to receive those files directly to my dropbox space. whatever the image or video taken by the user, it will be stored on a folder in my mobile storage. Here what i want is, i want the folder in my mobile storage to be in sync with the folder in my dropbox.
How can i do this?
there is a app in market called Foldersync which exactly fulfil my requirement. how they are doing it? How can i keep a folder in my mobile storage and a folder in my dropbox to be in Sync?
Note :
i have gone through drop-box api and created a simple app to send files directly to my dropbox space and i know how to download a entire folder from dropbox.
But here my question is unique from that... pls don't answer the above points which i already know..
Please help!
Thank You
You can use the Dropbox API to keep a local client in sync with Dropbox. There are two main pieces to this:
1) Metadata:
Assuming you're using the Core API, the best way to get information about all of the file and folders in an account (or optionally under a specific path) is to use /delta:
https://www.dropbox.com/developers/core/docs#delta
With this, you can get information about everything your app can see, and then easily stay up to date with changes. There are some useful blog posts on using /delta here:
https://blogs.dropbox.com/developers/2013/12/efficiently-enumerating-dropbox-with-delta/
https://blogs.dropbox.com/developers/2013/12/filtering-dropbox-delta-results-by-path/
2) File content:
Using the metadata retrieved from #1, you can download any files you need access to locally using /files (GET):
https://www.dropbox.com/developers/core/docs#files-GET
You can upload locally changed files using /files_put:
https://www.dropbox.com/developers/core/docs#files_put
Or, for larger files, use chunked uploading:
https://www.dropbox.com/developers/core/docs#chunked-upload
https://www.dropbox.com/developers/core/docs#commit-chunked-upload
The main work here will involve programming the logic in your app to correctly receive changes from the server as well as upload local changes, in order to keep everything in sync.
Also, be aware that on mobile devices, bandwidth can be limited and/or expensive, so be careful to not accidentally automatically download a lot of data the user doesn't want or need.

How to tell when a shared file has been consumed by the shared app in android

In my application, I am sharing images using the Intent.createChooser() mechanism. The images, as displayed on the device, are not in their best resolution and prior to sharing, my app fetches the full resolution images from the server. The file paths to these full resolution images are sent to the shared app. When sharing is done, I want to delete these images. But when the sharing application returns control to my application via onActivityResult(), which is where I delete the full resolution files, some applications (gmail, yahoo mail, fb messenger) have already consumed these files, whereas others (android mail, fb) have not, and it becomes a race condition between my code deleting these files and FB fetching these files for upload. And 9 out of 10, FB upload fails. When I do not delete these files, FP upload is always successful. Since these are temporary files, I do need to delete them or the storage will eventually become full.
I thought about using my app's cache space, which is automatically cleaned up by the OS on as needed basis, but the app's cache is not accessible to the external applications; thus, the sharing fails.
How do I handle this issue?
Thank You,
Gary

What is the proper way to write a mobile app that updates itself by downloading data instead of doing an app store update?

I've seen several apps where the initial app is a few dozen megabytes but, once you start the app, they need to download "extra data." Sometimes this data is hundreds of megabytes (eg. The Simpsons Tapped Out).
What is the proper way to do this? I know that modifying the contents of your app is a no-no, as doing so will invalidate your app's signature. So, are you just supposed to write this data to the sdcard? Is Apple ok with apps that have no initial content of their own and need to download everything? I assume Android would be fine.
Also, if the data I need to download contains assets (such as images and even HTML files for web views), is there an easy way to keep these files from prying users?

Application that use a lot of MP3 files?

I have a general doubt about how to design Android apps that use a lot of MP3 (or other audio) files. My problem is that I do not know what is the best way/location to store such files.
I know that these options are available:
Store them on a remote server and fetch via gprs/wifi on demand (like, on a button click)
Store them locally inside the app (taking care they do not exceed the max size)
Store them locally on the sdcard (a user could delete them)
Store them both remote and locally
Could you tell me what is the best way to do? Also, if you store these files locally, do you download them after a user installs an app or you use some other method?
For example, my last app had approx 400MB of MP3 files and I was in a deep doubt where to store them. I chose remote web server, but I am not sure that was the right choice.
Thanks in advance
I'm interested in how you convince people to download 400MB of Music-files. You should compress them.
I would store them on the SDcard. If the user deletes them -> His problem (you could give him a message). But streaming them is a bad idea because if the user has no connection, he can't hear anything.
Downloading the files after the user installed the App (like the "Need for Speed Shift"-App) would be an option, too. In this case, you would save them on the SDcard, too.

Categories

Resources