Saturday, April 23, 2011

Eclipse Dark Color Theme

I discovered http://www.eclipsecolorthemes.org for conveniently creating your own personal color scheme for eclipse. I am making available the dark theme I have been using for some time. Try it out or create your own easily on http://www.eclipsecolorthemes.org.



Color scheme import instructions
  1. Download the my color scheme from http://www.eclipsecolorthemes.org or create your own.
  2. Choose "File" > "Import"
  3. Choose "Preferences" then "Next"
  4. Browse to the ".epf" file you downloaded and select it.Then press "Finish".
And now your code window should immediately display your new color scheme.





Thursday, March 3, 2011

Android app & Netduino plus to monitor and open garage door


I have started a new blog on the Netduino plus board. This is my first foray into embedded programming. I just received an Arduino Uno board and a Netduino plus board. I am going to chronicle a home automation project that includes the following elements (I will be documenting everything you need if you want to join me!) 

  • Netduino plus with garage door sensor
  • Open and close the garage door with the Netduino plus
  • Send commands to the Netduino over HTTP
  • A RESTful webservice that talks to the Netduino plus over HTTP
  • Write an Android app that talks to the RESTful webservice that talks to the Netduino
  • An Android app to monitor my garage door and open/close it.
I will be posting every step of this project with parts lists, instructions and code examples. If you want to learn more here are some links.

Tuesday, April 27, 2010

Comparing The Old & New Eclipse Theme .prefs Files

by Guest Contributor Bill Mote

If you're wondering what's inside the 2 prefs files we replaced in the Eclipse themes post; here is a "compare" (or diff) using Eclipse's own built-in compare function.  The files are human readable.  The original unedited file is on the left in each image.  Click each image to enlarge:

org.eclipse.jdt.ui.prefs

org.eclipse.ui.editors.prefs


Monday, April 26, 2010

Applying Themes to Eclipse

by Guest Contributor Bill Mote

--> Skip to the How-To

I'm new to event driven development.  I stopped coding back when VB was in it's infancy.  I did pickup classic ASP and do enough scripting in interpreted languages to kindle the desire, but it was not until the release of Android that I genuinely got on fire about coding again.

What did I find?  A lot of barriers.  You wouldn't think that's true given the open and free nature of Android.  Greg, aka Android Code Monkey, has put together an idiot proof tutorial on setting up the development environment.  That was my first hurdle.  Check.  I moved on to his Hello Android tutorial.  Check.  Next I tried the Android Developer's NotepadCodeLab tutorial.  Easy enough I thought.  This time you just "open the AndroidCodeLab folder" as instructed and you're moving right along.

Open it how?  I tried various imports.  I tried opening the source and various .xml files.  All I did was build my frustration, but I'm not giving up.  Instead I purchased "Head First Java."  The book is awesome.  It focuses on teaching Java and avoiding the IDE hurdles but I decided to code the examples in Notepad++ and Eclipse so I could be 1 step ahead when I finished.  The leap from C++ to Java isn't that great and things seemed to make sense so I'm moving right along.

One thing I noticed about the Eclipse environment is how absolutely blinding it is!  During the day it's tough enough, but at night, when I get most of my keyboard cycles for development, the open IDE is exhausting on my eyes.  Another hurdle ...

Cut to the chase already ...

When Greg asked me to be a guest contributor I couldn't wait to get this information posted.  I want to remove as many barriers as I can for new developers like myself!

My first searches for Eclipse and Themes didn't produce much and the information that was available was, or at least seemed, convoluted and complicated.  Turns out changing the themes in Eclipse is very, very easy!

There are 2 files used to display the themes:

Colors are managed in this file: org.eclipse.jdt.ui.prefs
Text Editors are managed in this file: org.eclipse.ui.editors.prefs

Those files can be found below your Eclipse workspace folder which can be found here:

Windows -- .metadata\.plugins\org.eclipse.core.runtime\.settings
Linux/MAC -- .metadata/.plugins/org.eclipse.core.runtime/.settings/

I found an archive file with 6 different themes including the "default" to easily undo any of your changes.  Here's what they look like:

Inkpot

Sula


Vibrant Ink


Wombat


Zenburn

The archive contains the 6 images and 6 folders; 1 for each theme.  In each folder you'll find the 2 aforementioned files.  Simply extract the 2 files from your desired theme into the appropriate Eclipse folder as described above and launch Eclipse!

Monday, March 15, 2010

Getting Started with Android Development

You want to be begin Android Application Development. But how do you get started? The first thing you need is to download and install the development tools. The good news is they are free and fairly straightforward to setup. The bad news is there are so many options it can become confusing which tools are required, optional or compatible with your desired setup. Following the setup I am using and will work for you if you using a Windows system.

Step 1. Install the following tools
  • Eclipse IDE for Java Developers (v3.5 Galileo)
  • Java Platform (JDK 6 Update 18)
  • Android SDK Tools, Revision 4
You can follow my previous post for step by step directions (with screen captures) here.

Step 2. Create your first application. Try my Hello World tutorial here.

Feel free to post questions or comments.

Monday, March 8, 2010

How to base64 encode decode Android

The official documentation states that base64 encode and decode in Android is in the Android.util package. But when you go to use it you will find it's not there!

After much searching, I confirmation Android left base64 encode and decode out of the Android.util package. So what to do? Don't worry, Robert W. Harder has but together a very fast Base64 encoding and decoding class you can include in your project. Here is how to add base64 encode and decode to your project.

Step 1. Visit Robert's website http://iharder.sourceforge.net/current/index.html and download the class file.

 
Step 2. The zip file you downloaded in step 1 includes the base64 class and a folder with examples and documentation.
Step 3. Copy the Base64.java class file into your project. Copy into your appropriate "src" folder.
Step 4. Refresh your project so the new file is included.
Step 5.When the Base64.java file is included in your project, you will get the following error "The declared package does not match the expected package". Fix this by opening the class file and adding a package declaration that matches your project.
Step 6. Done. You're ready to base64 encode and decode.
 

Download the complete tutorial here

Saturday, March 6, 2010

Vidoes - My First Android Application in the Market

My first Android application is now in the Market. Why did I create this application? Frankly, because it's missing from Android OS. There is a music application for listening to your music. But, to view your videos you must launch the gallery and view your videos mixed in with your pictures. Also, you don't get the video title or video length.

The "Videos" application fills this void with a simple scrolling list of just the videos on your phone. The features of the application:
  • Thumbnail of your videos
  • Video name
  • Video length
  • Time left (if you are in the middle of watching a video)
  • Launch the video

If you have an Android 2.0+ phone you can find it in the market by searching "Videos" or get more information here.


Videos screen capture

Videos screen capture