OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>

Join the forum, it's quick and easy

OruxMaps
Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>
OruxMaps
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Created map! ... how to install it to the SD card using an app (apk)?

2 posters

Go down

Created map! ... how to install it to the SD card using an app (apk)? Empty Created map! ... how to install it to the SD card using an app (apk)?

Post  jluers Thu Jan 27, 2011 1:07 am

I succeeded in creating a nice topo map using raw data from USGS (elevation data), NHD (rivers and lakes), DOT (roads) and it works great in ORUXMAPS !!! How cool!

Now, I'd like to automate the installation process of copying it to the SD Card by using an app.

I'm VERY new to Android development (I'm still working on the Hello World app) so any details would be very helpful.
How do I create an app (APK) who's ONLY purpose is to install/copy a map to the oruxmaps/mapfiles folder on the SD Card ??

I've found plenty of info on creating very sophisticated apps but nothing so far on the simple task of installing (copying) a file to the SD Card.

tHx!

jluers

Cantidad de envíos : 14
Fecha de inscripción : 2011-01-27

Back to top Go down

Created map! ... how to install it to the SD card using an app (apk)? Empty Re: Created map! ... how to install it to the SD card using an app (apk)?

Post  orux Thu Jan 27, 2011 6:53 pm

jluers wrote:I succeeded in creating a nice topo map using raw data from USGS (elevation data), NHD (rivers and lakes), DOT (roads) and it works great in ORUXMAPS !!! How cool!

Now, I'd like to automate the installation process of copying it to the SD Card by using an app.

I'm VERY new to Android development (I'm still working on the Hello World app) so any details would be very helpful.
How do I create an app (APK) who's ONLY purpose is to install/copy a map to the oruxmaps/mapfiles folder on the SD Card ??

I've found plenty of info on creating very sophisticated apps but nothing so far on the simple task of installing (copying) a file to the SD Card.

tHx!

Hi, jluers;

Do not quite understand, I guess you want to create an application that brings a map inside, and when installing, will copy the map to a directory. Right?

You can copy in the 'assets' folder what you want. Then you can move the map from assets to the sdcard:

http://www.mail-archive.com/android-developers@googlegroups.com/msg00520.html

But you need to uninstall the apk after, because if not, it will remain in the device memory. (An intent to an uninstaller application?). And if the map is large, sure there will not be enough memory, unless you install the apk directly in the sdcard.

I think it would be more useful an application that download files from a server, and copy them to wherever you want.

orux


orux
orux

Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06

Back to top Go down

Created map! ... how to install it to the SD card using an app (apk)? Empty Re: Created map! ... how to install it to the SD card using an app (apk)?

Post  jluers Thu Jan 27, 2011 10:35 pm

orux,
Correct, I wish to create an app that when I install it, it copies my map to the orux Mapfiles folder on the SD Card.

Great link, just what I needed. My map is only 50MB so that should be small enough for the Assets folder. Agreed?

I had not thought about the app remaining installed after it is finished. Can an app uninstall itself as part of its own installation?!

UPDATE: Lots of Googling led me to this snippet:
But I did find where a .apk can uninstall itself via:
*Uri packageURI = Uri.parse("package:com.android.myapp");
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);* *
* *startActivity(uninstallIntent);*


Perhaps there's hope. Very Happy (though I haven't a clue what it means...yet)

Thanks you very much for the help!
j

jluers

Cantidad de envíos : 14
Fecha de inscripción : 2011-01-27

Back to top Go down

Created map! ... how to install it to the SD card using an app (apk)? Empty Re: Created map! ... how to install it to the SD card using an app (apk)?

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum