Assignment 2 – Android Lookup

Android Lookup

This is an Android utility based on the several *nix utilities.

Enter a hostname or IP Address on the main screen.

Lookup:

The lookup functionality gathers information about the given host. All known IP Addresses, the Canonical Name of the host, and whether the host is up or down are displayed in a table.

Whois:

The whois functionality displays “whois” information for a given host. The “whois” information is displayed on a separate screen.

Downloads and Documentation

Assignment 2 extends the Android Lookup utility.

Binary is located at

http://jdburton.github.io/AndroidLookup/AndroidLookup.apk

Source code is now at GitHub:

https://github.com/jdburton/AndroidLookup

Doxygen documentation for the Java classes is located at:

http://jdburton.github.io/AndroidLookup/index.html

Screenshots

Screen Shot 2014-02-05 at 9.26.32 PM

Opening screen. Enter a hostname or IP Address. Globe looks it up. Question mark is Whois query

Screen Shot 2014-02-05 at 9.27.46 PM

Results for yahoo.com. Sometimes Java can’t access servers that are accessible. This is due to a limitation in Java. http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4921816

The table scrolls. Note the multiple IP addresses for yahoo.com

The table scrolls. Note the multiple IP addresses for yahoo.com

Screen Shot 2014-02-05 at 9.47.28 PM

Java will find some hosts. This host is known to be up and accessible from the network.

Screen Shot 2014-02-05 at 9.28.44 PM

A whois query. This text view scrolls in both directions.

Screen Shot 2014-02-05 at 9.29.00 PM

About and Acknowledgements. This view has been upgraded to a WebView to take advantage of HTML formatting. Links will open in the Android browser.

Screen Shot 2014-02-05 at 9.29.56 PM

Fail to enter a hostname? Get an error dialog!

Bad hostname? Get an error dialog!

Bad hostname? Get an error dialog!

Acknowledgements

Android Lookup 0.2

This would not have been possible without some great Eclipse tools:

I installed doxygen and git on my Mac using Homebrew.

I am now using github for revision control and, well, just backing up my projects.

Rick Foo’s blog about how to use doxygen with github to create a nice documentation page.

TableLayouts

Apache Commons/Whois

WebViews

Message Dialogs

Android Lookup 0.1

Special thanks to John Ingram for his excellent in-class presentation on software development.

Also, thanks to Greg Edison for demonstrating the drag ‘n’ drop functionality of Eclipse and other hints.

Great info about procrastination, including the instant gratification monkey, at http://waitbutwhy.com/2013/10/why-procrastinators-procrastinate.html and how to beat it at http://waitbutwhy.com/2013/11/how-to-beat-procrastination.html

Acknowledgements in the source code:

Handling networkonmainthread exception with AsyncTask:http://stackoverflow.com/questions/6343166/android-os-networkonmainthreadexception

How to do nslookup in Java:  http://www.coderanch.com/t/328875/java/java/nslookup-Java

More on InetAddresses from:http://download.java.net/jdk7/archive/b123/docs/api/java/net/InetAddress.html

Determining whether a string is an IP address:http://stackoverflow.com/questions/11723184/checking-if-string-is-web-address-or-ip-on-android
How to clear a edittext field: http://stackoverflow.com/questions/8758635/how-to-clear-the-edittext-when-onclick-on-button

How to display toasts:  http://developer.android.com/guide/topics/ui/notifiers/toasts.html

Android Menu functionality from http://developer.android.com/guide/topics/ui/menus.html

Guide to the Action bar from http://developer.android.com/guide/topics/ui/actionbar.html

Image for lookup icon used under Creative Commons license from:http://www.iconarchive.com/show/old-school-icons-by-babasse/recherche-internet-icon.html

Image for internet picture used under Creative Commons license from: http://commons.wikimedia.org/wiki/File:Internet1.jpg

Tagged with: ,
Posted in Android Development, Progress Updates

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: