Distributing large content in Android - android

I have to distribute large content to be consumed by my application. The data size can be upto a few gbs. What is the best way the data can be sent out?. The solution has to be efficient and cost effective. I ve thought about giving out sd cards (bad solution, since most devices have just one slot and nobody will use it solely for the apps purpose), downloadable from the internet (nobody will download gb's worth data from the internet),package it with the app(Not possible to upload the app to the market)

Is all of the information needed from the very beginning of the app? Maybe you can incrementally download it in the background and prioritize the data. You can set it so that it only downloads on wifi as well of give an option for it.

Android market has now extended the maximum APK file size to 4GB.
I would suggest that in the use case of downloading from the internet (i.e on the phone) then you restrict it to wifi only. THere are plenty examples of this out there using connectionmanager detection.

Related

offline web page caching with persistent data

Hi i'm trying to make my HTML webpage offline for android and IOS devices. My problem is that I need to store a lot of data. This data (css,js,images,html) needs to be persistent. (even after shutdown of the device)
USE: Someone types the URL and gets the whole page offline available.
What is the best way to persist your data? and is it possible without making a hybrid or native app, just with caching and maybe appcache/indexeddb.
EDIT: i have found that indexed db in combination with dexies my best guess is for a solution. are there any do's or don'ts, alternatives or tutorials you guys suggest ?
depending on the application personality I sometimes render the entire site/application in the service worker when the service worker is installed/activated.
I wrote about an example app I did last October for a conference, https://love2dev.com/pwa/pubcon/
As far as strategy, I vary things. For data (think JSON) I tend to cache in IndexedDB (I like localforage b/c it is simple).
For site assets (HTML, JS, CSS, Fonts and often media) I use service worker cache.
If a site is heavy on media, I persist images and video in IDB b/c iOS limits service worker cache to 50MB. 50MB should be more than enough for any web application core assets as they should really be measured in kb, not MB anyway.
iOS gives you several GB of IDB storage, depending on how much disk space is available on the device.
I have built multiple SAAS apps using this strategy and never hit data quotas. Of course lots of video or images will of course consume more space and you need to watch for quota exceeded errors.
Users will also be prompted to give permission for extended storage as well, so be aware of that barrier as you may need to educate the user about this.

Where to store files for my Android App, Storage and Performance-wise

I am building an android app which requires to have >300 images and ca. 100 audio files for an apk size of around 50mb (after webp compression and proguard).
It is not huge and I could probably live with that. But since I am planning to add other features the size will get bigger and bigger.
I am still interested though, since I'm quite new to android development, if there is a better way to store all this files, perhaps remotely and access them when required.
When the app starts I would have to load all the images into a list and once an element of the list is tapped I would need to open a separate activity and load the sound. So there is no upload from the App, just a resource gathering.
I do not know if it is more efficient this way or to store all the files locally.
Either way I would like to know what my options are. what are the pros and cons of a server (and if it would be a viable solution for me at all) and what is the advantage of storing them locally instead.
Please keep in mind that I working by myself and haven't got money to invest on premium servers or stuff like that.
FILE STORAGE will be best for you. Performance depends on the type and amount of data you are using. You do not need too much of data manipulation so go for file storage if privacy is not your concern for the data as it will be available for all the applications.
Use SQLite Database if the files needs to be protected from other applications.
Use File Storage(internal/external memory) if other applications can also access your files.
Avoid Fetching data from server using JSON parsing/Http requests it will make your app rely on the internet all the time. Unless you are using it to update your database or file storage.

how to create a server for large number of images and access them in android app

I'm developing an android app which involves a lot of images to be displayed. I cant store those images locally because the total size of images will be around 300 mb. So my question is, how do I store those images somewhere (like a server) and access them in the android app? I have looked through other questions but they talk about having a database and information about each user which I dont require.
I just want to store those images which will be of fixed size (user wont upload images) and display them in android using a http request.
Can I use google drive for doing this? I also read that google drive has some limit on the usage of public folders. So I dont think I can use that.
Any other way? like some free image hosting site or free server or something similar?
Or do I have to pay and use amazon web services or something similar?
I have zero knowledge about web services and servers.
actually where you want to use your app means you want use as personally or in business purpose .
If you use for business purpose then you take space on any server by paying some amount or you use just testing purpose then you use your local system as server by installing wamp.

Site parsing and opening with slow internet connection

I am making a network app that works with a few news sites. I have an option to view and download articles (for reading in future). There is no fast mobile internet in my country (mostly 2G with the speed up to 15 KB/sec) and my app doesn't work really well with the slow connect though it's perfect with fast connection. As I have seen from logs it can't establish the connection. When I try to open the article it doesn't load at all or goes into infinite loading. When I try to save the article it simply saves the blank file. How can I track these mistakes and catch them? And what are the correct ways of handling it?
I suppose that my code is irrelevant as it works correctly with Wi-fi. I think I simply need to add lines, not to edit them
ok, you need to manage the information very good, you need define the package size to download, you need a webservices that allow to you to manage the information one by one, for example you need design packages no more than 500kb size to download, when this package is downloaded you can show something in your mobile and continue downloading the next package in background.
500kb is only an example you need to test what is the maximum data size to download and create packages like that in your web services

Android App: Storing lots of images on a server

I'm in the process of developing an Android (just Android for now, maybe iOS later) app which relies heavily on taking pictures, storing those pictures on a server somewhere, and being able to retrieve any picture whenever a user needs it which will be very often.
The problem I'm fearing before even getting that far into the coding is how I'm going to cost-effectively store all of these pictures on a server. If the app were a success there could potentially be hundreds of gigabytes of images being stored and many users requesting 1 picture at a time each.
So I'm wondering what approach I should take. It seems to me my options are either use a web host or use some cloud computing/storage service. I think hosts might be out of the question because I don't think a host would support that amount of storage. That leaves me with cloud computing.
I've looked into GAE and AWS. AWS seems like the best approach because I could use S3 to store my images and then RDS to store information for each user in a relational database. I know next to nothing about server stuff, so I don't really know what all I should use in the AWS setup. I know I need S3 and I know I need a relational database, that's all. So what features exactly would I need?
Or does anyone know a better approach all together I should take?
Also, in Android is compressing images an option so they won't take up as much space on the server? Is the quality affected a lot?
I have used AWS for storing images uploaded from Android devices. What I did was to upload the images directly to s3 using AWS Android SDK and then keep records in database of the keys/paths where each user uploaded his images.
This approach has the advantage that you don't use your server (for example EC2) for the image uploading, leaving you server available for other tasks.
If you are going to use AWS I think you will need at least the following services:
S3: for storing the images.
EC2: For deploying your server code.
RDS: For your database (assuming you are using a relational database)
There are a lot of tutorials out there about uploading files to s3.
http://aws.amazon.com/articles/3002109349624271
You can estimate costs using Amazon's calculator

Categories

Resources