Pimlical Android Help

Folder and Files Layout

The Pimlical folder is usually a main folder directly off the root of the area that is identified as "External Storage". Depending on the Android device, external storage might be a physical SD card or just a portion of main memory that emulates an SD card. The usual setup is:

External Storage
    Pimlical
   
    PimlicalCalendars
   
    PimlicalContacts
    
    PimlicalMemos
   
    ExportedCalendars

All the main preference and settings files are contained in the Pimlical folder. This includes the user preferences (default filename for the User Preferences is default.txt and the default filename for the System Preferences is SystemPreferences.dat). Backup files are also stored in the same folder with extensions of BK1 (always the most recent backup), then BK2 etc. up to BK9 (this is controlled by the Preference Setting: NumberOfBackups). There may also be weekly and monthly backups (which are taken once a week or once a month, so they may be only a day old if they were recently taken).

There are four sub-folders that may be present underneath the Pimlical folder if local databases are used. These folders MIGHT not be present at all if the user ONLY uses Android calendars and never created a local calendar, or used local memos or contacts.

The calendar is stored in Pimlical/PimlicalCalendars with the default filename of PimlicalLocalCalendar.dat. Again backups are stored in the same folder with extensions BK1...BK2...etc. If you have other local calendars (such as an Archive), these will also be stored in the same folder. For example, the default archive calendar is stored in PimlicalArchiveCalendar.dat in that same folder.

If you are using a local contacts database, it will be stored in a file called contacts.dat in the folder Pimlical/PimlicalContacts. Again, backups are stored in that same folder.

If you are using a local memos database, it will be stored in a file called memos.dat in the folder Pimlical/PimlicalMemos. Again, backups are stored in that same folder.

If you export calendars from Pimlical/Android, the exported calendars are stored by default in the folder Pimlical/ExportedCalendars in industry-standard iCalendar format. These calendars can be directly imported into Google calendar, Outlook and virtually every other Calendar application on any platform.

The "Dat" format for these databases is a proprietary "sparse" format which is optimized for minimum storage while still providing fast access. Pimlical provides full import/export capabilities though in industry standard formats (iCalendar for Calendar events and tasks, vCard 3.0 for contacts, and standard text files for memos. Note that the file format in Pimlical is 100% identical for Pimlical/Desktop and Pimlical/Android - so you can always copy files (both preference and data files) freely between the desktop and Android device. Preference files are a bit trickier to copy since the preference layout is not 100% identical between those two platforms (due to the vastly different User Interface).

File Update Mechanism

Files are always updated in real time, so if the device crashes no data should ever be lost. When a record is updated, added or deleted, rather than touching the main DAT file, Pimlical writes all the changes into a SEPARATE file which has "_Updates" appended to the filename. So for the default calendar, updates are written to a file called PimlicalLocalCalendar_Updates.dat.

Whenever Pimlical goes to READ a DAT file, it first reads the DAT file, then looks to see if there is an _Updates file. If there is, the updates file is read and the internal database is updated with that new information (the presence of a uniqueID in a database allows Pimlical to match up the updates with the original records in the DAT file. After the _Updates file has been read, Pimlical then writes out a new DAT file with all the updates, and deletes the _Updates file. So in most cases, the _Updates file is only transitory and gets written, deleted, and written again on a very regular basis.

Forcing Use of SD Card in Android 4.x and other Android OS versions

Note: Android 4.4 (KitKat)  no longer makes it possible for a third party app to have full access to your SD card. Although it would be possible to get Pimlical/Android to run with its own folder, there are severe limitations that make it highly unadvisable to do that (in particular, the folder is deleted when the application is uninstalled, and if you move the card to another device, the files are not likely to be visible). However, if you are running an earlier version of Android (4.3 or earlier), the procedure below will allow Pimlical/Android to use the physical sd card. Android 5.0 (Lollipop) restores some of the prior functionality, and so it may yet again be feasible to support your physical SD card. This feature is not regularly tested on each OS release as Google is constantly changing what is and what is not allowed, and since many vendors make custom modifications to the Android OS, it would require an inordinate amount of testing to determine on which devices it might actually work.

Some Android 4.x devices (Ice Cream Sandwich version) support both SD card(s) and what is referred to as Phone Storage or Media Storage. When connected to windows desktop, Windows own File Manager can see Phone/Media Storage as a pseudo-device, but other applications (including Pimlical) can not. In that case, you would have to copy the local calendar file to the desktop using File Manager, sync and copy it back. However, if the Android device does have an SD Card, you will typically want to use that instead of Phone Storage as then you can have Pimlical/Desktop access the folder with the local calendar directly.

There are devices that do have an SD card that displays normally under windows, except that Pimlical defaults to using Phone Storage instead (this is due to the fact that the Android function that normally returns the file path to the SD card instead returns the path to the phone storage). If this is the case with your phone, there is a feature in Pimlical/Android that will still allow you to have Pimlical use the SD card instead, but this does require a bit of fiddling: Create a one line text file (in windows or in Android phone) with the name PimlicalStoragePath.txt, where the one line of text contains the full path to the SD card. For example, the SD card usually appears as /mnt/sdcard. One some Motorola phones, the path to the Sdcard is /mnt/sdcard-ext in which case the one line in the PimlicalStoragePath.txt file would be:
/mnt/sdcard-ext
Then make sure this file appears in the root directory of the path that Phone Storage appears in. When Pimlical first launches, it checks to see if a file with this name exists, and if so, uses that path instead - so this file must be located in the folder that Pimlical first looks in. If you need assistance in getting this to work properly, contact technical support. If you are not sure what the path is to your SD card, you might install a free file manager as most of those will tell you what the path is to the SD card.

On Samsung phones, the sd card is usually 'extSdCard' - so you would put /mnt/extSdCard in the PimlicalStoragePath.txt file and put that file in /mnt/ (which is basically the root folder above extSdCard and sdcard (the latter being an emulated SD card in internal storage). The path is case-sensitive, so make absolutely sure it is 'extSdCard' and not something like 'ExtSdCard' which will not work.

Also, some newer Android phones (such as Motorola Atrix 2) give you the option of treating the USB connection as either "Mass Storage" or "Media Device" - definitely pick Mass Storage as then it will mount as a regular windows device that can be seen by Pimlical/Desktop.

As users provide more information, here are some additional comments that may be helpful:

Motorola Razr Maxx HD: the location of the Sd card appears to be /mnt/external1. The path /sdcard is not for the SD card at all, but appears to be the virtual Sd card in internal storage. Put the PimlicalStoragePath.txt file (Specifying /mnt/external1) in /sdcard to force Pimlical to use the physical SD card.