0

I am beginner and I am learning android. I have just very simple android application wchich use osmdroid. Actually on my phone I created direcotory /sdcard/osmdroid and to this directory I put map.zip file.So my application use this file to show map.All is OK.

But Now I want to put my application to android market. So I want to put apk file.But where should I put map(map.zip)??.How do that: when user start install my application,application donwload map.zip and create directory /sdcard/osmdroid and paste map.zip to omsdroid directory ??

1 Answers1

3

You have two options:

  1. If the map file is small enough, you can include it in the assets folder and then copy it to the sdcard. This should help: offline map include in .apk file
  2. The other option is to have the app download the zip file from the internet. You could host the zip file on a web server, Dropbox, Amazon, etc... and then have the app download and save the zip to the sdcard when it starts for the first time.

Either option doesn't require any additional work from the user. No need to have them copy and paste the zip file themselves.

Community
  • 1
  • 1
kurtzmarc
  • 3,110
  • 1
  • 24
  • 40
  • If you choose solution 1, here a solution I implemented myself: http://stackoverflow.com/a/14832770/891479. One remark, after using this solution for a while, I finally implemented a map download as my apk was becoming too big. – L. G. Oct 15 '13 at 10:50