Mintoris Forum

Author Topic: Preparing your data to make an APK  (Read 5155 times)

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Preparing your data to make an APK
« on: Sep 26, 2015, 01:54 AM »
If you want to create an APK app from your program and your program uses data files (text, images, audio, whatever), then you must put all of your data files into a single folder under Mintoris.Basic/Data. You may create sub-folders under this single folder.

So if your program was called Fun.bas, you would create a folder Mintoris.Basic/Data/FunFiles. Then all of your data files would go into the FunFiles folder.

From within your program you would use a path like:

Open 1, "FunFiles/Settings.dat", "r"

When you go to Export APK Project, select FunFiles from the list of data folders and that folder will be zipped up into your apk file. Then the first time you run your new app, it will create/unzip FunFiles and all of its contents into your data folder.

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: Preparing your data to make an APK
« Reply #1 on: Oct 03, 2015, 02:44 AM »
There is a checkbox on the Export Apk Project screen the says: Update data when version changes.

When this checkbox is checked your data will be unzipped again each time the version changes. Or, in other words, the data will be updated when the user updates your app. You do have to change the version number on the export page each time you make a change and want to release an upgrade.

Keep in mind that all the files from your data directory will get overwritten when this setting is used. So, don't include any files that get modified in the zip file or they will get wiped out.

The setting may be switched on or off if your data needs to be updated or not for any given release.
« Last Edit: Oct 03, 2015, 02:48 AM by Chuck »

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: Preparing your data to make an APK
« Reply #2 on: Nov 18, 2015, 11:56 PM »
I'm going to lock this thread now before it gets too big. Please start a new topic to discuss your experiences.

-Chuck