My First Android App: CallerID

I’ve been looking for an excuse to write an Android app, and those annoying “unknown number” phone calls presented themselves at the perfect problem to solve.
My CallerID application consists of two parts: a service that runs on a server and given a phone number returns the information associated with it, and an Android app that uses the service to display information to the user upon request or when the phone rings.

The apk is located at “mainline/application/target/callerid-1.0-SNAPSHOT.apk”

These steps do not perform the integration tests. If you want to run those, in the step above that says “cd mainline/application” run “cd mainline” instead. Note that you’ll either have to have your Android phone plugged in to your computer (and running in debug mode, recognized by adb) or an Android emulator running.

To create a ready-to-release apk, which includes running proguard, zipalign, and jarsign, run this command from the “mainline” directory: mvn clean install -Prelease -Dsign.keystore=/home/candrews/projects/callerid/test-key.keystore -Dsign.alias=mykey -Dsign.storepass=testtest -Dsign.keypass=testtest Note that this command will sign using the test key. If you really want to distribute the apk, you’ll need to generate your own key using keytool. In either case, the ready to distribute apk is located at “mainline/application/target/callerid-1.0-SNAPSHOT-signed-aligned.apk”

If you want to develop the application using Eclipse, first make sure that you can successfully compile the application using the steps above. Then you need to install some Eclipse plugins:

That’s it – Eclipse should automatically build as you go, and you can use the Eclipse/Android development tools just as everyone else does.

I hope both the server portion and application portion are reasonably easy to run, build, and understand. If you have any questions or concerns, please comment – and contributions are of course very welcome to both projects!
Please note that this project is not in any way related to my employer – it is a completely personal, non-work project. This article has been cross-posted to Isobar’s blog.

Is there a database of known spam-callers that we could add? Would be great if those unknown numbers were tagged. Since they may have a name from your regular database query, maybe we could color them in RED or something?

There are a number of such databases (some are country specific, some not). I intend to add support for just such a feature, including the ability to simply ignore calls that come from known spammers (assuming the platforms allows such call blocking… we’ll see).

You don’t list the Netherlands as supported, but you do have The Netherlands in the drop down menu on the Caller ID web service. However, it doesn’t seem to work on any phone number I know, both local and landline. Are you planning on adding support for The Netherlands any time soon?

@Jeroen
Unfortunately, for now, all I can do is tell you that the phone number is from the Netherlands.

I can’t find any web sites that will perform reverse number lookup for the Netherlands (given a phone number, return who owns it). If can find one, let me know and I’ll gladly add support for it as quickly as I can (probably within a couple of days).

@Ernest
Actually, if you’re a Verizon/Sprint/any CDMA network user and your phone has LTE service, then you won’t lose Internet access during a call any more. So you have that to look forward to

I’m also working on an update that will lookup the incoming call’s location offline (which will work nicely for the non-LTE CDMA users). I plan on displaying this offline information until the online lookup completes so at least you get geographical information.