Monday, January 31, 2011

Simple Alarm Clock has AdMob Integration

As of my last posting, I was having issues getting AdMob integrated into my applications. After a little android layout education, I learned my problem was entirely in my UI design. Also, through Google, I eventually found somebody that had something more than the SDK example and included a more complex layout with code.

The example code turned out to be relatively easy to modify after all the investigation I had done about layouts. I was able to simplify the code to just the basic pieces I was focusing on. Since I have been unable to find an equivalent example anywhere online, I will try to get to posting the code and explanation in the next couple of days. I have a decent base shell now that I will be using with all my free apps on the Market in the future.

I have posted my updated Alarm Clock to the Market which is now at version 1.2. In addition to the AdMob integration, I also added a widget. It displays the next alarm time or "Disabled" if there is no next alarm. There is also a button on the widget to open the alarm clock app. I will try to get some cleanup on the widget UI to make it cleaner/nicer but that will probably take back burner to other projects until I have enough free time to concentrate on that aspect.

Finally, to confirm I had the AdMob functionality down, I first created a test app, MyAdTest which is also posted to the Android Market. Download both, MyAdTest is useless, but leave it up for me for a bit and help generate a little coin for me; I will appreciate it. For now, the Alarm Clock and MyAdTest are the only two apps I have posted. I have a couple more that I will probably be putting up there soon. I have a little polishing to do on both but it should be manageable.

I forgot to get screenshots of the test ads before when I was still testing on the emulator. I will pull those up by the next posting as well.

Thursday, January 27, 2011

I'm On the Market - Simple Alarm Clock

I finally got back around to my Alarm Clock and made a few updates. It all started when I completed my Simple X10 Client and was thinking about releasing it as my "Free" client and then releasing the more feature-rich version for a fee.

Immediately I thought about the Android Market as well as integrating ads into my application. Since my alarm clock application was already completed and has served me well, I decided it would be the best candidate for looking to integrate ads and test it out.

I did a little bit of searching and advertisements seemed pretty simple. I picked a tutorial to follow and started downloading the necessary pieces. Eventually I had to go to AdMob.com set up an account. That process required information from the Android Market though and I had not taken that step yet.

I decided it was time and shelled out the $25 to become an official Android Market Developer. I reviewed the guidelines for publishing on the market and then set out putting icons together, screenshots and cleaned up my application. I renamed it from DonnsAlarm to SimpleAlarmClock and fixed a couple other minor things I didn't like about it. I tried to get the ads working, but kept running into issues. Eventually I just gave up and removed any of the code related to the advertisements. I typed up a little description, posted the icons and screenshots and then exported the signed apk file.

At this point, I was pretty excited to go online with my phone and download my application from the android market as opposed to from my home webserver. I easily found it by searching for "Simple Alarm Clock". Between my icon (left) and  my developer name 44D8 (appears under the app name), I was able to identify which was mine. I downloaded it, set an alarm for the morning and forgot about it.

The next morning though I had realized the mistake of not testing the app after the download. I screwed up the alarm function some how. What I found was, as I cleaned up the code, I deleted a little bit more than I should have and removed the entries for the alarm activity from the manifest.xml file.I just assumed that since I had been using the old DonnsAlarm version for months that it would just work. I realized it didn't work when my kids woke me up this morning, late, because they were calling for mom or dad from inside their room. The nice thing is they ensure I don't wake up too late no matter what. I was double pissed though when I realized I had overslept, I realized my first post was a defective app.

I got home tonight after work, downloaded the code from my original blog posting for the alarm app and filled in the missing pieces for my updated version. This time when I was all ready to post to the market, I downloaded it first to my phone and tested it.  When it worked, I posted to the market. I wanted to make sure I could get an update posted today so that anybody that had downloaded it could get an update and hopefully before the alarm fails them.

Currently the app is posted, for free and without any advertisement. I will probably continue to test the advertisement options with this until I get it. I am not sure if it will be kept on the alarm clock or not. Part of me wants to keep it off to keep it simple, but the other part wants to see what the advertisement model will do. We will just see. I think I want to figure out widgets next.

Here is the updated Simple Alarm Clock v1.1 project on box.net

Tuesday, January 25, 2011

Simple X10 Client 1.0 Released

I successfully screwed up my previous application I was developing and struggled with it for a couple days without any progress. Today though, the light bulb when on while driving home from work and I realized I could create a very simple application that does what I need at a very bare minimum. I knew my other application's issues were related to the extra functionality so I decided to cut it out for now. I do plan on returning to the more feature-rich version, but after I investigate the Android Advertisement model.

The final client is a very simple interface for issuing X10 commands over the internet. There is a Room Code Spinner which allows selection from A-P. There is a Unit Code Spinner which allows selection from 1-16. Finally there is a toggle button for picking which command to send.

I was able to build this app in just a couple hours tonight. I was able to steal a lot of code from my other application and that saved a lot of time.

Below is the project folder on Box.net. See the Arduino Server at arduino-donno.blogspot.com for the Web server interface.