Heart Notes

This is a simple application to take and manage notes related to heart issues. It has a database with the following fields:

One of its advantages, is that you do not have to enter things like the time, since they are entered automatically.

Heart Notes has been made to work with the Android Storage Access Framework in order to comply with Android policies about writing external storage. The database itself is located at /primary/Android/data/net.kenevans.heartnotes/Files/HeartNotes.db. ("primary" usually has a name like /storage/emulated/0.) This is an app-specific directory, and anything in it will be lost if the app is uninstalled. Owing to recent changes there is nowhere else to put the database (except in internal storage where it would not be visible at all). The database can be replaced with another Heart Notes database, perhaps a backup, if desired.

The data, such as saved text and databases, go in a data directory. You need to allow Heart Notes access to this directory by selecting it in a system file chooser. You do this with the Set Data Directory menu item. It can be on the external SD card. Starting with Android 11, it cannot be the Downloads directory. Repeating this operation with a different directory will override the previous setting but will not move the files. You can do that manually. The data in this directory will be retained on uninstall (provided it is not in app-specific storage).

Heart Notes requires permissions for Location if you use OpenWeather to get weather information.

The main screen consists of a list of the notes in the database. There is a floating button that will start a new session, and this may be done via the menu as well. Clicking an item in the list allows you to edit it in the edit screen, which has entries for all of the fields plus Delete, Cancel, and Save buttons. The weather is inserted automatically if this is a new session. There is also a menu item to insert the weather manually.

Main Screen Menu Items

New

Start a new note. Brings up a screen where you can view all the parameters, set the settable data, and compose the note. It attempts to insert the weather automatically. This will fail if no weather key has been registered or the weather site cannot be reached.

Filter

You can filter the notes by None, Count is not Zero, and Count equals Total. Setting the count to be the same as total can be treated as denoting a more serious arrhythmia than missing beats.

Sort Order

You can sort ascending or descending in time.

Beginning

Moves to the beginning of the list.

End

Moves to the end of the list.

Refresh

Recreates the list from the database.

Save as Text

Saves the database as a text file to the Data directory. The name is of the form Heart Notes-yyyy-MM-dd-HHmmss.txt, and the values correspond to the time it is saved. The file is intended to be formatted so it can be viewed and printed without editing. It can also be read as a CSV file, tab delimited. Note that it is better to not use tabs and carriage returns in the note itself. It interferes with restoring the database from one of the text files or using it as a CSV file. The lines are of the form:

2/60 	Jun 03, 2012 23:00:00 -0500 	After working out.

Save Database

Saves the current database itself in the form Heart Notes-yyyy-MM-dd-HHmmss.db. This database can be restored with the Replace Data base option. It can also be replaced from a saved text file with the Restore option.

Restore

Restores the database from one of the saved text files. Since the editing information is not saved, it will be set to the date the database was restored.

Replace Database

Restores the database from one of the saved database files.

Set OpenWeather Key

Heart Notes can get the current weather from OpenWeather and insert it in a note. To do this you need to register and get a key. (It is free.) This is where you set the key.

Choose Data Directory

You can set the data directory where text files and database backups are saved. You have to do this or you cannot save these items. You need to allow Heart Notes access to this directory by selecting it in a system file chooser. You do this with the Set Data Directory menu item. It can be on the external SD card. You can use this to switch to different directories with different data, if you like. This is the directory for saved files only. The database remains in /primary/Android/data/net.kenevans.heartnotes/Files/HeartNotes.db unless replaced manually.

Help

Displays this page.

Edit Screen Menu Items

Insert Weather

Allows you to insert the weather, if it can be found. It uses OpenWeather. To do this you need to register and get a key. (It is free.)