Many thanks to SWLing Post contributor, Bill Hemphill, who shares the following guest post:
Radio Schedules in a Simple Android Database
by Bill Hemphill
I am a program listener. I really enjoy listening to various radio stations direct and by internet streaming. Over time, I have come up with a couple of spread sheets that lists the program, station, time, date, etc. For example, following is the spreadsheet for the shortwave radio programs/stations that I enjoy:
As the program schedules change, I update the spreadsheet. This has worked quite well for me. I usually sort on the weekday and then print out the spreadsheet as a list by time and frequency for each day.
While this method works, it does mean that I have these multiple page printouts that I have to refer to. This got me thinking that it would be great to have this on my Android phone/tablet. Then I could refer to it no matter where I was located.
At first, I tried to use Google Sheets, but found that using a spreadsheet on the phone or even a tablet to be a pain. I then tried entering it into a calendar program, but also found that very cumbersome.
What I needed was a simple database that could load the spreadsheet and then allow for sorting and searching. But I really didn’t need all the features of a full database program. All I really needed was a viewer that could present the data in rows and columns and where I could sort and then select a subset.
Searching though the various database apps for the Android, I found that most were full fledge databases, many required monthly subscriptions, and all were way more than what I was looking for. I just wanted a row and column view that I could sort and search on.
After experimenting around with many of them, I came across the free, very basic app PortoDB:
It’s a very basic DB app. Doesn’t require a lot of unneeded permissions, and does everything I need. To use, just create the Spreadsheet, save it as a CVS file, email the file to yourself (or copy it to the phone/tablet), and then import it as a table into PortoDB.
This is how the Shortwave spreadsheet looks like on a tablet in PortoDB:
I realized that I had a lot of wasted space by putting all seven day columns. So I switched to a single day column as follows:
Before I go any farther, I should tell you about a major quirk with the PortoDB app. Even though it will let you have various data types (Text, Integer, Real, Date, Time, etc), all sorts within the app is done as if the data is text. To get around this, I just create all the data in the spreadsheet as TEXT. To get the sort to work correctly, I put a space before frequencies that are less than four digits. Likewise, the Times are entered as TEXT. With that little change, then the sort always works correctly.
Let’s go thru the steps to create a database and associated table.
The first time you open ProtoDB, it will say “No databases”. Just press the PLUS symbol to create a new database. In this case I’ll call it “Radio Programs”:
As you can see, I now have a Database “Radio Programs” which contains No Tables. Each database can have multiple tables. I have already saved the spreadsheet as a CVS file and emailed it to myself. Now I need to Import the CVS file into a Table. Press the Three Vertical Dots to get a menu and select “Import Table”. Then select the CVS file to import. Give the Table a name. Answer OK to the “Are You Sure” message. It will then tell you how many rows are imported. Select OK.:
[Click images to enlarge.]
You now have the Database “Radio Programs” with one Table “SW Programs”. You can now Tap on the Table to see the data. You can scroll up and down (and left and right if all the columns don’t fit on the screen) thru the data.
The fun is that now you can search on any particular column and create a subset of the data. Tap and hold on the column name to get a pop-up menu. Select search and then enter the text to search for. I selected DAY and entered “Mo” to get a subset of only Monday in the database”
At this point I realized, I wasn’t happy with how the data was sorted. Press the three vertical dots and select “Sort Rows”. I then said to sort the rows first by Program, then by Day and then Freq:
I then decided to sort based on Day, then UTC Start and Freq:
At this point I realized, I wasn’t happy with the order of the columns. I would like to have Program first then UTC Start, Freq, Day and Station. Press and Hold on the Column name and then select “Move Column Left (or Right)” to rearrange the columns…I also deleted the “UTC End” column.
Note: This could have been done in the original Spreadsheet file before exporting to CVS and importing into the Table.
There are plenty of menu choices and I invite you to explore them.
If you notice at the bottom of the data, there are some funny arrows that may appear on the left, right or on both:
In the above they are on the right only. The database displays in “Pages” of so many rows. Tapping these arrows allows you to page through the database. Each page defaults to 50 rows.
This can be changed in the settings. On the list of Tables, Press and hold on the Table name. Then select “Set Page Size”. There are two settings for the Page View sizes. These default to 50. I usually reset these to something a lot larger, like 500 or 1000. As long as the Table has fewer rows than the Page View size, then you can scroll thru the entire table with having to page.
One last item about the settings. The Database is active and you can change, modify, add, delete from it at will. Since I’m using it as only a way to view my data, I usually “Lock” the Table. After Locking it, many of the Setting options will disappear from the menus until you once again Unlock the table. Locking it keeps me from accidentally changing the data.
Example of Database for FM Radio Programs
Another example is the database I did for FM Radio Programs. I maintain a spreadsheet of various FM Radio Shows, their date and times along with the URL of the station stream.
After I export this to a CVS and then Import it as a Table to Radio Programs” database:
In this case, I do press and hold on the URL column name and then change that column to URL type. This then allows me to Press and Hold on any URL and then select “Navigate To”. Which will then bring up Chrome with that URL and then the radio station starts to stream on the Phone/Tablet.
Making use of the phone/tablet with PortoDB is so much better than thumbing through sheets of paper.
Hopefully others will find this useful and maybe find other uses for it.
Update: There’s been some requests for the CSV files that I used to create the SW and FM radio databases. Attached are current versions of the two files: