Can I upload content(any type png/jpg) onto android market, which I could download while the application is running.
No, you can only upload Application .apk files on to the Market.
If you don't have much content you can embed it in your application as a Resource. The content is then embedded into the .apk file and you can retrieve it using a standard Android API.
If you have lot of content - say, many megabytes - which you would rather download and perhaps cache on the SD card you'll need your own website.
You can also add it to /res/drawable and use it without the need of downloading.
Related
I want to download a pdf from a url on Android>=11. My app is targeting android version 30.
I read that due to restrictions introduced from Android 11, it does not easily allow us to store files in external Downloads folder and we have to store it inside Android/package_name/[folder]/[file], but I want to store it in Downloads folder so that my user does not have to go inside Android/package/[Downloads]/[file] to view that file.
Also on devices which are running Android<11, I can download that file by simply using getExternalStorageDirectory right? Please provide me some clarity on this.
I found some answers previously but they weren't that helpful. Can anybody tell me how to achieve this?
In Android 10ff it is not easy to use the java class "File" to store data in a public accessable folder that is pre-defined by your app.(ie the public download folder)
Instead your app has to ask the app-user where he/she wants to store the document.
I am developing an Android app in Java using OSMDroid to deliver offline maps in Mapnik tile format in a .zip file.
My question is about how to deliver these maps to users who download the app from the Play Store.
I don't know the exact size of my finished tileset but it will be a .zip file of about 100MB.
In protyping I am including a smaller tileset in my project's /assets folder, and on first run copying it to the user's external storage directory using the getExternalStoragePublicDirectory(Environment.MEDIA_SHARED) folder and replacing /shared with /osmdroid (on my phone it is /storage/emulated/0/osmdroid) and creating the directory if necessary. It's a bit of a hack but it works.
The problems with this are that the tileset (about 100MB) remains attached to the application while a copy is created in external storage. Which is kinda wasteful of space. I may also encounter problems with the APK being too big.
I thought of allowing the user to download the .zip file from an FTP server after they're finished installing the app (prompting them that it's a biggish download and to use WiFi if possible). I haven't looked at the technicalities in detail but this strikes me as being fairly straightforward to implement. However, I can't find any descriptions of people using this method.
So, my questions are:
Is there a standard or recommended way of delivering Mapnik tiles to users in live for offline use?
If so, what is it? (preferably with links to examples if possible)
Thank you to everybody in advance for your help!
In the end I downloaded the zip from an FTP server. This has been tested with a group of test users in a real-life environment and it seems to work well.
The zip file is downloaded to the directory returned by the method getExternalFilesDir. This returns the app's data storage directory which gives the advantage over a hard-coded path that when the app is uninstalled the zip files are also deleted.
I have an app which contains 3rd party apk's for users to download and install on their Android phones. But I would like to have a mechanism through which my users can open those apk's inside my app itself without the need to download them separately on their phones. Is it possible?
That will not be a good choice as keeping those apk files inside your application will increase size of your own application. One good approach to put those apk files on your own server and give a download link in the application for each apk.
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.
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 .