Wednesday, January 30, 2013

First ham app for Android

My first Android app
I thought that some of you might be interested to look at the first app I have completed using Basic4Android (B4A) called WhereAmI. It's no great shakes as an app, and I think there is at least one other in the Android Market that does a similar job. My app's unique feature is that besides the locator it shows the national grid reference (NGR) as well as the Worked All Britain (WAB) square. WAB is a popular activity on the low HF bands over here.

Because NGR and WAB only cover the UK, my app will not be very useful if you are outside of Great Britain. Indeed the app will probably blow up if you try it outside the UK as I haven't included any test that the user is within these sceptred isles.

I'd rather not say how long the app took me to complete, but it was far longer than expected given that I had already written code to convert from lat/long to grid locator in VOAProp. That code was in Pascal, and the trouble was caused by the fact that Basic4Android does not have equivalent functions to those in Pascal, or even Visual Basic, so I could not just do a copy and paste. In the end I found a conversion routine written in C++ and converted that to B4A's dialect of Basic. From there on it was easy, as there is a user-written library in B4A to handle conversions to/from National Grid references, upon which the WAB programme is based.

If I don't try something else I might have a go at displaying a Google Map centred on my location, as one of the examples that come with B4A does just that.

I don't plan on publishing any of the apps I create in Google Market (or Google Play as I think they now call it). I am doing this just for fun. Think of this as the programming equivalent of those radio projects knocked together on a breadboard or built Manhattan style, with no expectation that they will get put into a nice box.

If there is any interest I will make available the B4A project files as a zip file so that folks can play with them, hack them about or use them as a starting point for something better.

Sunday, January 27, 2013

RR9O back on the air

ChangeDetection sent me an alert that the International Beacon Project web page has changed. The Hawaii beacon KH6WO has gone off the air.

The Russian beacon RR9O is still shown as off the air but I noticed today that Faros has recorded several spots of this beacon on the 17m and 12m bands. Other amateur beacon monitor sites have recorded it as well. I have updated the beacons.txt file for VOAProp with both changes.

Thursday, January 24, 2013

Seeing red

I just started up Google Chrome and my eye was caught by the minimize, maximize and close buttons in the title bar, which are bright red.

They stick out like a sore thumb. I can't believe I wouldn't have noticed it before. Is it just me, or my computer? If the buttons have changed colour, why? My eye is constantly drawn to these bright red buttons. It is a real eyesore.

A PSK Core DLL mystery

The runaway success of the Elecraft KX3 has resulted in a sharp increase in the number of users of KComm. Even those who use a full-featured logging program in the shack find the simplicity of KComm and the compactness of its user interface (which was designed to fit a netbook) better suited to portable operating.

I received an email from a KComm user in Vienna, Wolfgang OE1MWW who wrote that he found the option to "Use PSK modem" (which uses AE4JY's PSK Core DLL to operate PSK31 using the sound card) was disabled on his laptop running Windows XP SP3 though it was enabled on his desktop running Windows 7 64-bit. Wolfgang eventually found that replacing the file PSKCore.dll that was installed by KComm with one dowloaded from AE4JY's website cured the problem.

I am surprised and a bit mystified as to why this occurred. My shack PC also runs Windows XP SP3 (I prefer to stay as far from the bleeding edge as possible) and it uses the same version of PSKCore.dll as is installed with KComm.

KComm's version is much smaller so I'm hazarding a guess (since I can no longer remember) that it may have been compressed using UPX, an executable file compressor. I used to have a bit of a mania for compressing executable files so I could claim how small they were compared to certain other ham radio bloatware, but in these days of 100GB hard drives it's probably rather fatuous. Possibly the compression caused an issue with some security software?

Whatever the reason, I'm grateful to Wolfgang for discovering a solution. I have added a note to KComm's Troubleshooting page and updated the installer package to include AE4JY's copy of the PSKCore.dll so hopefully new users will not encounter this problem.

Wednesday, January 23, 2013

Basic Android Programming

Up until I got an Android smartphone, there has not been a single programmable device that I've owned and not tried to write my own programs for it. However, programming for Android devices seemed to be fiendishly difficult, requiring a good knowledge of Java (which I haven't got) so I didn't attempt it. The other week I saw an article in a computer magazine that went through describing how to create programs using a tool called Basic4Android. It seemed similar enough to other development tools I have used such as Visual Basic, Delphi and Lazarus. So I thought I would download the trial version and have a play.

The Basic4Android development environment,
I soon discovered that the trial version is pretty limiting. It's enough to get a feel for the environment and the development process by creating "hello world" apps and suchlike, but in order to do anything interesting you need to use libraries and these are only accessible using the full paid-for version.

There are two full versions of Basic4Android you can buy: the Standard version which costs $49 and includes support and free upgrades for two months, and the Enterprise version which costs $99 and includes support and free upgrades for two years. As I'm not an Enterprise, only a dabbler (and a cheapskate one at that) I bought the Standard version. With hindsight that was not such a good idea, as I discovered after purchasing that only current paid-up users get access to the download links for additional libraries, even user-written ones, and access to the support forum. So after two months I'm on my own. A false economy, I think.

Sophisticated GPS apps can be developed
Basic4Android is a very powerful development tool and I don't think there is much you couldn't do with it if you're clever  enough. The language is object oriented like any modern Basic, and objects exist to let you access the internet, draw charts, access SQL databases and much more. You can access the Android device's GPS via a fully featured GPS library. There is even code to work with Google Maps. I have no intention of developing an Android version of APRSISCE (as if I could!) but Basic4Android looks powerful enough to make that possible.

So far I haven't learned much about Basic4Android programming that's worth sharing with people, but here are a few things I wish I had known prior to buying.

There is no need to pay the full prices I mentioned earlier. Once Google finds out you are interested in Basic4Android, ads to buy Basic4Android with 30% off will follow you around the web. To get the deal, click on one of them.

There are two options you can use to pay for Basic4Android, PayPal and Plimus. If you are in Europe then be sure to use the PayPal purchase buttons. If you use Plimus then you'll get stung for VAT which will bump up the price 20%.

Better still you can get Basic4Android Enterprise version with two years' updates and support at half price by using the coupon code dnxyif. Unfortunately this is only valid if you use the Plimus payment option so there is no avoiding VAT if you are in Europe. But even with VAT it's still the best deal I think. I hope that helps someone.