I have a Verizon Motorola Global 2 (Droid 2) Android smartphone. My phone is NOT rooted so you don’t need to do anything special to your phone to make this work. I’ve wanted a way to be able to view my contacts on the phone but hadn’t found a usable method until today. I had tried using Android based database applications such as Memento but I was unable to successfully import the Ham Radio Deluxe (HRD) database in without it crashing. I use Microsoft Access as the underlying database in HRD v5 so if you are using MySQL, your steps might vary slightly. The solution below might not be viable for all folks but if you a little technical or willing to experiment and have some SQL knowledge it could be a very useful solution. Everything below is free and requires nothing to be purchased. The first steps are only necessary the first time to get things setup/installed.
Installing the Android client application:
This step just needs to be done once. I found a program that allows you browse SQLite database files on your Android phone. This program is not one I located in the Android Market so you need to copy the installation file (APK) from your computer to your SD card. First download Android SQLite Manager from http://sourceforge.net/projects/asqlitemanager/ to your PC. Copy the downloaded APK file (aSQLiteManager.apk) to your phone’s SD card. I created a directory on my SD card called SQLite and copied the program there. Using the built in Files program I browsed to my SD card and the SQLite directory I created and launched aSQLiteManager.apk . It asks if you want to Install it so click Install and proceed. You will then have a new program/icon on your home screen called aSQLiteManager.
Installing the Windows PC client application:
This step also just needs to be done once. On the PC side, you want to download a free program called SQLite2009 Pro Enterprise Manager from http://osenxpsuite.net/?xp=3&uid=managementtools . Scroll down a little on the page to find the free version. Download the ZIP and run the enclosed exe to install the program. This program allows you to create/manage SQLite files.
Creating the Ham Radio Deluxe SQLite database:
You want to run these steps whenever you want to refresh the Ham Radio Deluxe database copy on your Android smartphone. Launch the SQLite 2009 program you just installed and across the top you’ll see an icon in the middle of the toolbar that when you mouse over says “Import Data”. When you click this, you’ll launch the MS Access Import Wizard. You’ll need to know the location of your HRD Logbook. Mine is located in the directory at C:\Users\xxxx\AppData\Roaming\Simon Brown, HB9DRV\HRD Logbook where xxxx is my user name on the PC. In the wizard, select the location and MDB file of your HRD logbook database. The default option selected is MS Access so you don’t need to change that, but if you use MySQL in HRD5, you’d select that option first and then specify the appropriate connection info. Click next and you need to specify the new SQLite destination and filename. I specified C:\Program Files (x86)\Osen Kusnadi\SQLite2009Pro\database\HRDLogbook_2011-05-01.db3 which is the date of the import and the location of SQLite on my PC. Click Next again and select the only HRD Access table called TABLE_HRD_CONTACTS_V01 and click Next again. The database will be create/imported and you’ll just click finish after it completes. I have about 27k records and a relatively fast computer and it took under 1 minute to import the 27k records to build the SQLite file.
The only oddity I noticed is the file was not saved to the directory I specified and instead was saved to C:\Users\xxxx\AppData\Local\VirtualStore\Program Files (x86)\Osen Kusnadi\SQLite2009Pro\database so look in a similar location under your AppData\Local directory if you don’t find it where you specified.
Now you can copy the .db3 SQLite file from your PC to your Droid. I placed mine in the SQLite directory I created in the first part. My SQLite file was around 27MB for the 27k records.
Using the aSQLiteManager Android program:
Now with your Android app installed and the converted HRD database on your phone, launch the aSQLiteManager program from your home screen. Note the “a” at the start of the name so don’t scroll down looking for it starting with “SQL”. When you launch the program the first time, click the menu button on your phone and select Options in the app. Check off the option to Save SQL in database so it remembers your recent entered SQL, at least until you refresh the database. Click Open Database and select the HRD database file you just copied from your PC and confirm you want to open it.
You can view the table structure, etc but where the value is for you will be behind the Query button. If there was a more user friendly vs developer friendly generic SQLite client for the Android, folks might have an easier time, but until I find one or someone points one out, this is the best solution for now. Behind the SQL button you can enter in or select recently entered in SQL. SQL is the statement which tells the database what you want it to do/retrieve for you. An example of a SQL statement for the HRD data would be:
select * from TABLE_HRD_CONTACTS_V01 where col_call = ‘K2DSL’
and after typing that and pressing the RUN button all records where I was the person you logged would be returned. A more manageable set of results would be:
select col_time_on, col_mode, col_band, col_call, col_country, col_contest_id from TABLE_HRD_CONTACTS_V01 where col_call = ‘K2DSL’ order by 1
That query, in landscape mode, allows me to see all fields and scroll through the contacts I made with a given operator in the order they were made. If you’re not comfortable with SQL, this could be a bit tough but doable. To see all the column names, don’t use the menu button in the SQL entry window but go to the main window and select table and drill down to see all the columns.
In the SQL window if you click your phone’s menu button there’s an option for Recent SQL which will pull back recent queries you made to save on typing.
This is more of a technical users solution but it works. I’d appreciate any feedback or alternative options you have found. Also as new apps are released, this could only get easier.
73,
K2DSL – David