Showing posts with label Desk Clock Plus. Show all posts
Showing posts with label Desk Clock Plus. Show all posts

Tuesday, February 9, 2016

WOIED Me

It seems that the Yahoo query table that I've been using to convert latitude and longitude into this thing called a Where On Earth ID (WOIED) which is used to look up the weather was shut down January 22, 2016.  This has lead to a number of emails saying the weather has stopped working. Fortunately there is a work around... If you go into the weather settings then choose "static location".  You'll be prompted for a location and you'll get a list of choices if there's more than one.  After the location is set use the next option down "use static location". This will give you a choice of three options, choose "always". The weather should load upon returning to the main screen.

There's a couple problems with making a fix for the issue.  Yahoo doesn't seem to provide a different way to convert latitude and longitude in to this WOEID. The next biggest problem is that I've had a serious lack of free time since finding out about the issue so I really haven't researched it yet.  The next big problem is that I currently don't have a development environment set up any more.  As I've always said, I'm a lunch time android developer and I started a new job about 6 months ago.  I've been working on other side projects and haven't installed anything to do Android development.  Which leads to the next problem... I didn't keep up with Android Studio (the "new" Google built IDE) and never converted the old eclipse project, so there's a bit of work to be done before I can fix the problem.

I do have two possible solutions once the development environment is setup.  
  1. Another free API (or APIs) to find the WOIED.  This is the simplest solution.  I've thought about finding a way to convert Latitude and Longitude into an address and then feeding that through the same process as the static location.  This way I can re-use the weather code. 
  2. Another free weather source.  openweathermap.org has been in a updates file as a possible replacement for the yahoo weather source, but this means a completely new API and completely re-writing the weather code (plus issues with images, etc).  This might be the best solution, but I don't know if I'll have the time to do it.
The bottom line is that I know there's an issue.  I know exactly where the problem is, but there's a lot of work that needs to be done before I can publish a new APK.  Please be patient, I'll get a fix out eventually.


Friday, May 8, 2015

Fixed!

So, I found the problem with the in app purchasing not verifying (the payload)... and it turns out that:
string1 == string2
would return false (even though they were the same string) but,
string1.equals(string2) == true
would work as expected.  Now, this is something very small and trivial and something that I potentially should have realized a lot faster.  The problem is that (for right now) I don't do java development and that's just how things work in java.  My 9-5 job is slowly (and I do mean SLOWLY) starting to move into the world of web development using angular and java script and at that point comparing two string values using .equals will become trivial, but for now the .NET developer that I am expects the == to work the same way.

As usual, when I end one of these posts, I'll mention what the future holds for Desk Clock Plus.  As usual, I'll say that I'm not sure.  It is one of those things that I want to get back to and do a proper re-write.  However, over the past two years or so, I've started working more with a non-profit museum that I've belonged to for most of my life.  I'll be starting on a fairly large project that will need to be completed by October(ish).  While that seems like a long time, remember that I'll be working on it less than an hour a day.  After that, who knows...

But the one thing I do want to do is thank everyone who has downloaded Desk Clock Plus and a big thank you to the people who threw a dollar at me for the extension.  I never though that it would ever have been downloaded over 50,000 times and still have 9-10,000 installs.

Bob

Friday, May 1, 2015

273 Days

So... last post here was (as you guessed) 273 days ago and yes, with this post comes an update to Desk Clock Plus.  However, it's pretty minor and probably doesn't affect most people other than me.  Back in January, Google deprecated version 2 of the in app purchasing API.  I was warned and I did nothing.  January came and went and in app purchase for the dock extension stopped working.  I've meant to go back and fix it, but my time has been rather limited as I've been working on other side projects during my lunch (ie the time that 95% of DCP was written).  I finished one project and before I start on something new, I decided to sit down and bang this out...

So, I've made the changes and tested as much as I can... it seems that the APK (ie program) needs to be uploaded and published for the In App Purchase stuff to work.  I've followed the coding example and I think it's good.  I've also checked the code for re-activating the extension if the data is reset.  However, I couldn't test that in a positive scenario (since I can't purchase my own extension), but I've seen the code check with the play store and see that it's not purchased.  I also can't go though the purchase process even in a debug mode.

So, I'm looking for two people to help me test.

  1. Someone who wants to purchase the extension (I have a couple people who have emailed me)
  2. Someone who has already purchased and is willing to clear the data for the app.  When you go back to the purchase screen, the app will check to see if you own the extension and if you do, it will activate it (after doing this you may need to clear the app from the recent apps so it restarts).
What does the future hold?  I don't know... I have a number of projects that I'm going to be working on during my lunch hour so I don't know when I'll get back to Desk Clock Plus.  I do want to get back to it, as I do miss doing the Android development and things have changed a lot since I stopped working on it.  We'll see what happens..



Friday, August 1, 2014

Does this still work...

...Why yes, it seems that it does! The updates here are few and far between (last post April 2013?!?!?) and the last update to the app was August 27, 2013?!?!!?  G+ posts have only been slightly better with the last one back in February.  I honestly should do another "State of the App" type post, but my time for today is limited.  So the short version of what happened goes like this (Starting in February):

  • Re-write started using Android Studio
  • Problems with Android studio kept development to a snail's pace
  • Something Super Crazy AWESOME happened
  • 100% of my time got devoted to that super crazy awesome thing
  • The super crazy awesome thing didn't pan out
  • Little bit of depression
  • The World Cup
  • Re-re-write started in eclipse and I've been addressing GUI changes
That brings us to Monday when I got an email about the app selector not working for the MP3 button.  This feature has been a pain in my butt since day one and I've gone though many different methods for picking a music app and I'm hoping that I've got one that works...

Also, Galaxy S5 users don't have a menu button any more, so they couldn't access the menu (there's a back door method), but I figured I should also add an on screen button.  That's what the colon in the upper right side is for.

I have been working on Desk Clock Plus V2 and hopefully I be able to share a rough screen shot shortly.

Thanks for your support and patience. 

Thursday, April 25, 2013

The State Of Desk Clock Plus

Earlier in the month when the Yahoo geocoder I was using got deprecated, I had to go in to panic development mode (something I'm used to sadly).  Once the issue was found, I came here to make a post about what the problem was and to let anyone who cared to know the issue was fixed and the update was available.  That's when I realized that I had done three posts in a year... and I got to thinking that there hadn't been that many updates to the app in that period either (11 total and most of them between April 2012 and Aug 2012).  Most of the later updates were crowd sourced translations and not new features or fixes.  I figured I better write something just to get me going again.

First, let me say that this isn't a dead project (unlike Launch Bar which has been replicated with features in the OS).  I haven't quit on the project, it's just been pushed to the background.  If you've looked at the About Me page, you'll note that that I say in my spare time I do Android development.  As a father of two boys and a new homeowner, my spare time is pretty much reduced to my lunch hour at work.  This fall, I took on an a task for a non-profit model railroad museum that I volunteer for.  So during my lunch hours of late, I've been trying to foster a g+ page for +The Western Pennsylvania Model Railroad Museum, redesign their website and get all the Google services working together.

Before going forward, let me explain a little bit about Desk Clock Plus as it exists now.  As you can tell by the look of it, it's based off the 2.x stock clock app.  In fact the alarm code is straight from the 2.2 Google source which can explain why some people have problems with the alarms and the app crashing on newer versions.  One of my main goals was to break up the code so that I could build multiple APK files (one per OS version) and still support as many devices as possible.  I learned about Libraries and started breaking up the code which lead me down a rabbit hole that there was no escaping.  After many attempts, I finally got everything to a point where I could compile the project and it crashed on load.... naturally, frustration kicked in and that's about the time when the Web site redesign for the nonprofit started up.

Some where along the line, I was helping a user with a question when the light bulb came on and I realized that I was trying too hard with making everything work and what I need to do is draw a line in the sand and start over.  As of this post, 66% of people who have Desk Clock Plus installed are running Android 4.0+ (the Play store tells me that only 41% of the apps in the Tools section are running on 4.0+).  So what does this mean?

The existing APK will be used for any device running any thing below 4.0 and will probably not change at all.  At some point in the near future (hopefully), I'm going to start a new Android project, bring in just the base layout and start coding from scratch.  Starting with the base layout (it kinda looks like a tennis court), I want to implement the same swipe and hide system for all four of the areas.  Along that line I would also like to allow the user to decide what panels they put where (Dock buttons on top, weather on the bottom, etc).  Even though I'm trying to avoid re-using code, there are somethings that are done very well and can be reused.

In regards to things that aren't done well, one of the first things I want to do is to implement OAuth.  This should start with getting the Google Images working correctly for both public, private and Albums shared to you.  Then that should be the gateway to connecting into the other Google services (Calendar being the next likely target).  I've also looked at using Flickr and 500px as background image sources and yes, setting a static image that's not your background.

As for things that are probably considered bugs, I have a list of things including:

  • Dimming the soft buttons (and I'm hoping the back light one devices with buttons).
  • Better scaling of images
  • Main Screen dim
  • A better color picker
  • Only keep awake if plugged in.
  • A better slide show

The in app purchase (IE freemium) system seems to be working well for me.  I will keep the app free, but things that go beyond basic that maybe not everyone would want or need will cost a little extra (ie the dock configuration).  This list isn't set in stone and may or may actually be free I'll cross that bridge when I get there.

  • The above mentioned panel configuration.
  • Improved weather information
    • Multiple locations
    • Forecast (3 - 5 days depending on what I can get)
    • Weather details screen
  • Enhanced Background Images
    • Use User X's pictures
    • Get me pictures tagged with X
    • 3rd party sources (Flickr, 500px, ex)
  • Basic Shuffle Music player
    • Randomly play music from this folder / play list
    • Google Music Streaming*
    • Pandora*
  • Enhanced Alarm
    • Play this play list on alarm
    • Launch App on Alarm
  • Daydream
    • This is the feature in 4.2 that works like a screen saver that will resolve some requests for the App to launch when you plug it in.

* A little note about integrating with Google Music and Pandora... Both of these services do not have a public API, however, some smart people have hacked together stuff that apparently works.  So purchasing the music player will come with those features, but I will not guarantee them.  So, you'll be buying my music player and getting those other features as a thank you.

Anyway, that's where things are right now.  When I get into Beta testing, I'll let the people who are part of the +Desk Clock Plus page know (this will also include free access to paid portions).

As always, if you have an idea or feature, feel free to let me know I can add it to the list.




Tuesday, April 23, 2013

I am HERE!

Yesterday afternoon, I posted the "second half" to the hot fix that was caused by the deprecation of the Yahoo Geo coder.  The static location picker should now be working again.  When you enter your location, if there's more than one returned you'll get prompted with the first 20 results.  If you're location isn't there you may need to provide more information (state for example).  In some ways, I'm a little happier with how this works, but in other ways, I preferred the old method as I was able to pre-filter the results by your location (ie US, UK, AUS, etc).

My goal for tomorrow is to write (or at least write most of) a post regarding the state of Desk Clock Plus.

Wednesday, April 3, 2013

Where are you again?

I got a couple emails about the weather not loading.  I looked into the problem and found that there's a problem converting your Latitude and Longitude position into a Where On Earth ID (WOEID).  It looks like the reverse geo coder that I was using got retired, so I made a quick change to use a different look up process.  There is probably still a bug in there when you're trying to search for your location to set it as a static location (if you're already using a static location, you should be good as long as you're not trying to update it).  I'll address that bug tomorrow or next week at the latest.

If you want to side load the update you can visit +Desk Clock Plus . on g+.

Friday, August 17, 2012

Previously on Desk Clock Plus...

It's been a month and a half since the last post.  Work and life in general has had me running like crazy with little time (or motivation) to work on the clock program let alone update the blog.  Since the last post on July 2, here's what's changed:

  • A number of smallish bug fixes that came up from any number of reporting methods (see: How to get a bug fixed.)
  • A quick hot fix because one of things I tried didn't work... 
  • Two new features:
    • Orientation Lock
    • Static background color
  • Caught a potential NULL value
  • Fixed a display bug for 100+ degree days
That brings us up to today's minor update which is just adding 1 minute to the screen saver time out.  I promised this to a user back in December, but I forgot about it.  Sorry!

I have been working on Desk Clock Plus when I can since the last post, but I haven't gotten anywhere really.  The game plan is to break the application up from one big project into a number of smaller libraries and one execution project.  This will then allow me to swap parts of the application out on a version by version basis. The real push for this is the Alarm code which is still based off the 2.2.  I had to maintain that version of code as it pretty much worked for all the different versions of Android.  Google made a major improvement for 2.3 which I'm not using.  The goal is to build a legacy version of the alarm and then other versions for 3.x versions and for 4.x versions.  Libraries are key to keeping all that code manageable by re-using all the common code among 3 different versions.  The problem is the code is so interlaced that can't quite get the code split up correct to avoid circular references (ie two libraries that reference each other, which leads to the chicken vs the egg problem). 

Earlier this week, I came to the conclusion that the on-the-fly design method really wasn't working (there's a big surprise) and I'm going to have to sit down with some design tools and figure out how I can break up the application that works for now and should work for future enchantments.

Monday, July 2, 2012

Hold on tight...

The updates might be a little fast and frequent for the next week.  I figured that I would spend some time reviewing the stack traces that have been sent in (I was up to about 15 issues).  Some of them were odd little things that only happened once, but still required some extra checks to make sure it didn't happen again.  I did however make a couple minor fixes to the stuff I released last week that caused some users to get an index out of bounds error.

I still have about 10 issues that need to be looked at, but as long as nothing critical comes in overnight, I'll probably hold off as long as I can before pushing the next set of bug fixes out.

Friday, June 29, 2012

Long time coming...

The last post to this blog was made on April 10th and the last update to the app was probably around that time as well.  That's almost three months... and you would think that after that amount of time I would have some crazy new enhancement ready to roll out.  Sadly, I don't.  After the last update, I started into looking at a weather extension and I think I have a plan for that, but then my 9-5 job got real crazy and home life got crazy.  I also got an email from a user who couldn't configure the docks, so I started into a redesign of the save / load mechanism for the custom docks.  The problem was that I lost motivation to work on this during my lunch break, so things started moving very slowly.

That started to change a couple weeks ago... with Verizon's move from the unlimited data plans.  My wife and I replaced our 2 1/2 year old OG Droids were replaced by shiny new Samsung Nexus' (Nexi?).  That kind of got me moving again as developing on the new phone is a dream compared to the OG Droid.  Then as it seems almost always happens I got a couple emails about the dock configuration issue.  What was nice was that one of the user's said that the problem started after his Razr was updated to Ice Cream Sandwich.  Quick emails to the other users and it seems that they were all on version 3.2 or higher.    I was able to confirm the issue on my new phone as well.  Fortunately, I was about 75% done with a rewrite of the dock extension and I was able to finish it up and send out a Beta to the users who has emailed me.

I made some other minor adjustments and that brings me up to where we are now.  Version 1.0.0.28 was just pushed out the market a little while ago with a better way for me to handle saving the dock configuration (that also works for ICS) and a small tweak to how I try to get the music apps, based off this article from Android ER.

I do feel a little motivated to work on Desk Clock Plus more after diving back into get this last bug fixed, so hopefully I'll be able continue to be motivated and get going on the other extensions that I've been thinking about since I started on the Desk Clock Plus project about a year and half ago.

Thank you all for your support and patience between updates.

Tuesday, April 10, 2012

How to get a bug fixed...


I've been meaning to do a post like this for a little while and with the last update, this seems to be a good time.

If something happens inside the app that causes it to crash, you'll probably see a window like this:


The important thing to do is hit that "Report" button.  I think that a lot of users don't even consider that as think it probably goes off to Google and into a list of a million other reports never to be read.  That certainly is the case for the Microsoft windows version of this screen.  However with Android, these reports come to developer and can be seen in the development console:


The 4 that I have outstanding are minor and happen infrequently, I've left them as "New" so I don't forget about them.  Each of the reports contain a stack trace (what functions were called before the application crashed).  For example, the bug that was fixed for Monday here's part of the stack trace:


Even if you don't understand everything (I don't always either), the important pieces are:
  • The app version
  • When it happened
  • How often it happens
  • What happens (a null exception in this case)
  • Where it happens (class name, file and most importantly line number)
The other bit of information that comes along is provided by the user.  When you tap the Report button you're given a chance to include a note of what you were doing (you could also include beer suggestions or your thoughts on Hockey or Soccer teams).  These notes are optional and not nessacary, but the user who sent in this report also sent a good note on what they were doing.
attempted long press set action on second dock of 4th icon to Music App
This defiantly helps me re-create the bug, but wasn't as important in this case.  Looking at the code I realized what had happened on line 512.  I had a check to make sure that I wasn't going to go out of bounds on my list of buttons and if something caused the buttons to go out of bounds, I cleared everything, displayed a toast message and reloaded the list of buttons.  As far as I can tell that's what happened to this user and instead of exiting when the reload was called it continued on (I missed an exit call).  Which then caused the null error.  The fix for this was very simply to add the exit call.

Hopefully this gives a little insight on how things work behind the curtain.

Tuesday, April 3, 2012

It's been rough...

Since March 13, I've had make a number of releases, sadly only one was a new feature, so just to make a quick refresher of what's been fixed:

  • 1.0.0.20 -- Brought a fix for the application not launching when it was not in a dock (the details were in the last post)
  • 1.0.0.21 -- This was the release of the tablet mode feature (details also in the last post).
  • 1.0.0.22 -- A number of code "fixes"
    • I spent some time with the theme down loader.  This is a good example of me not knowing what I was doing when I wrote it (not that I completely know what I'm doing now).  
      • I moved some code out into threads to avoid Application Not Responding reports 
      • I made some changes to how the dialogs were handled
      • I also localized some strings (I am working on getting everything localized)
    • I also got a report of an infinite spinning dialog when loading the album list which lead me to redo how I did the dialogs for the preference window (making things uniform with the theme down loader)
    • I also fixed the dialogs with slide show (another source of crash logs)
  • 1.0.0.23 -- My changes to the preferences caused a problem with the color picker which resulted in quick release.
  • 1.0.0.24 -- Fixed a problem with the themes loading incorrectly.  Which was pretty much there since the release of the tablet mode release.  The problem (for non scrolling dock users) would cause an icon to be loaded into the dock background instead of it's proper place.  The problem was just some really hard to read code and not being able to flush out all the situations where to use the tablet mode dock background vs the regular dock background.  There were some misorginized parentheses as well.
That should bring us to where we are now... What looks to be a pretty stable release that I can start to build on again.  The stabilization of the code shows in the stats that Google provides me.  Since the release of version 1.0.0.24 I've gained about 100 users in 5 days, and previous to that the amount of active installs stayed pretty level and looking back to the releases that had issues, there were points that I lost users.

I am hopefully going to start on something new here soon and that and that will include two other minor fixes.  One of which is upgrading the PayPal SDK.  It's very frustrating to get error logs and they are related to some random issue with the PayPal code that I don't have control over.


Tuesday, March 20, 2012

Hello IT... Yes, the programmer messed up.

I've been meaning to post this for a week now (wow, time flies when work kicks your ass).  The problem looks to have been due to a change in the launch app when undocked feature that was added for the scrolling dock extension.  It basically boiled down to not encasing things correctly in curly braces {}.  I didn't catch it because I didn't test the app outside the dock (yes, I know bad programmer!).  The app launched and it checked the state of the device to see if it was in the dock.  When the answer was no I check to see if if was launched from the dock.  When the answer to that is no, it shouldn't do anything, but the missing curly braces caused it to exit.  When you do VB .NET for a living, those little things will get you when you're not used to it.

Now for a bit of good news, I finished (what I think) is the last new feature for the scrolling dock.  I'm happy to introduce: Tablet Mode.


Screen shot provided by the super awesome Aussie commenter Omniwolf.  I will be happy to purchase him a beer (or any other beverage of his choice) if I ever travel there!

The Tablet Mode will extend the dock the entire width of the screen and provide a smooth continuous (instead of five icons at a time) listing of your applications.  Tablet mode will only display the applications and actions that you have configured (ie you will not see a blank plus icon).  So, if you only have seven buttons configured, you will only see those seven buttons repeated.  Currently, there is no long press menu when you are in Tablet Mode, as I'm not sure it would work well in this case.  If you are using a theme, you may want to go back and re-download the theme to pick up the tablet dock background image (if applicable to the theme).

The last note about all of this, when I released the hot fix for the app closing issue, I had all of the Tablet Mode code in place but hidden from activation.  I started to get a bunch of error logs in due to some of the Tablet Mode changes, but by the time I realized that the code had changed to the point where I couldn't exactly pin point the issue.  I think that I have them fixed or trapped, but I'm not 100% sure, so if you have problems with the app force closing or if tablet mode just doesn't turn on for you, please let me know.  If I get an error log via the market with the latest version I'll be able to track it down and get it fixed.

What's next?  I'm going to go into maintenance mode for a little while.  I have a couple of minor bug reports that I need to look into.  The Theme Downloader sucks and needs to be looked at.  After that, I'm going to work on the advanced weather add-on.




Monday, March 12, 2012

Hello IT...

While I do prefer that user's email me with issues, I do keep an eye on the comments for bugs and feature requests.  About two weeks ago this was posted:
Not working getting error "Update Location…"
I really didn't think too much about it as there wasn't much to think about (due to the lack of information) other than the XML string issue.  Although later that week I got another similar comment:
No longer works "Updating location" then won't open :( ... Droid Bionic
This started to raise some red flags.  I even got an email from a user who had helped with with issues previously asking about known issues.  I checked the error logs and  there was nothing... I couldn't think of what I would have changed that would cause any kind of problem like this.  Then on Saturday I understood exactly what both of these users were talking about.  I plugged my phone it to the wall outlet and turned on Desk Clock Plus manually.  After touching the icon, nothing happened and then I got the toast message "Updating location..." and then Forced Closed.  I tried it again and still nothing... I pulled a magnet off the fridge and found the magnetic dock switch (which worked).  I tried to think of what was wrong and what I could do and I thought rolling back to version 18.  After some WTF moments, I drew on my years of IT support and all of my learning from my advanced technical degrees.  I turned the phone off and on again...


Yes, that did resolve the problem.  What burns me though, is that it did fix it.  I was under the impression that things like this shouldn't happen in the *NIX environment (Android is based on the Linux kernel and keep in mind I'm not a Linux/UNIX guy).  The only thing I can think of is that the SD card was in some odd state or something as I know that other users have had issues with the themes not working.


Wednesday, February 29, 2012

Latest Update*

There are two new features and one bug fix with the current update:

The fix ended up being a minor one,  I was getting the state of the ringer when the device was added to the dock, but not restoring it when the device was removed from the docked.  So, if the phone was silent when it entered the dock, I would set the ringer state to 'normal'.  Not a catastrophe, but an annoyance.

The first new feature is for all users.  The last update I put in the first feature request from Martina for a one minute background update.  Her next request was for an alternate text color as some of her images are of snow and the white text for those images were being lost.  I did a little research and came up with a way to get the average pixel color and if it's whiter than the threshold level then it will use the alternate color (black by default).    You can set a custom alternate color and this is only in effect when the backgrounds are rotating.

The second new feature is for the scrolling dock to launch an app when un-docked.  When my Moto Droid gets retired from every day use (which will hopefully be soon), its next job is going to be a WiFi remote control for my Media PC which is running XBMC.  The idea is that the phone will run Desk Clock Plus and keep charged in the dock.  When it's time to kick back and relax with some TV, grab the phone from the dock and have it jump straight into the Official XBMC Remote.  I'm sure there's other uses, but that's what I have in mind for me.

Next up... tablet dock mode...

*  I try to be cleaver with the most post titles, but my brain is on fried from work and I couldn't come up with anything.  Possibilities included:

  • Steven King's Dark Tower as this is version number 19.
  • Along that line make a reference to this guy.  HWTL!
  • Or a reference to leap year.


Thursday, February 16, 2012

마스터 (Eighteen)

It's nice when people help out... much like Johannes did for German,  Jonathan volunteered to review the Korean strings.  Hopefully that will help him and the other 45 people that are using my app in Korean.  


Besides that, a minor fix to the night clock that might have been causing it to force close when dimming.  Also, Martina from Munich requested a one minute update on the background image.  I think that it's a little short, but as it was a very simple change I added it in.


I'm also hoping that this update might fix Don and Scott's docking issue (even though there was no change).  


I'm still looking into the alarm issues and I have at least one more thing to look at for omniwolf (Sorry to leave you hanging mate!)

Tuesday, February 7, 2012

A cause for alarm

First, a little note about the update from Friday.  There was a small fix on the preference screen where I was trying update the GUI from a background thread (that's a no-no).  The other fix was that I sat down last week and wrote my own translation app using a combination of .NET, LINQ and Microsoft Translation.  Much like Desk Clock Plus, it was me writing up something to fill my need, so hopefully this will keep all the strings in sync with all the different languages.

Next, Scott left the following comment:
Worked great before the last update Doesn't open automatically when docked anymore. Have to manually open it now. Also, the alarm turns off after every update.
Thankfully he (or someone else named Scott) followed up with an email.  I think his docking issue is something at his end as nothing with that has changed with that ever.  (Update) I got another email from someone else who said that there was an update for the same device (Galaxy S) and after that he was having docking issues.

The reason point of this post is the side bit of information that Scott tossed in about the the alarm turns off after every update.  This was actually a really big thing to me... I had had another user in the comments state:
Dont rely on alsrm The clock is nice BUT DONT RELY ON THE ALARM. It only goes off about a quarter of the time.
That comment was made right around the time that version 1.0.0.7 came out and there was a signification amount of code churn and updates being pushed.  If something is happening with the set alarms after every update then this comment makes a lot of sense.  I don't use the alarm feature of my application very often as I use it at my desk at work (hence the name Desk Clock Plus).  So, I've never set a recurring alarm and therefore never had a recurring alarm set when the application is updated.  As I said when Version 1.0 was released, the Alarm code was taken straight from the Google Source and honestly, I never took the time to review it / understand it.  I think my other two scrolling dock enhancements will have to wait until after this gets taken care of...

Friday, January 27, 2012

I'm waiting to hear back...

The last update fixes two issues, the first I realized there was a problem yesterday and I mentioned it on the g+ page.  There were a handful of Application Not Responding reports coming in and after a quick look yesterday, I realized that I committed a programming foul.  Typically, anything that's going to take a long time or anytime you're going out of the device to get something (picture, info, etc) you want to put it in a thread.  This way the thread can do it's thing and the main part application can continue doing it's thing.  I had done this in the past in a number of places (getting the image and weather just to name two).  However, I didn't think about doing this for all the new Yahoo! PlaceFinder web service calls that I mentioned in my Round up.  Depending on the device, the connection or traffic Yahoo! is receiving the reply from the web service might take too long and the OS displays that lovely "Something took too long" do you want to Force Close, Wait or Report dialog.  Most of the time, hitting wait will be good enough.  This is one of those things as a programmer that burns me as I know better, but since I don't deal with it often (or not at all for my 9-5 job) I just didn't think about it.

The other thing in this update should hopefully resolve the any future problems that Stu experienced.  Those problems frustrated him enough to leave this review.  Long story short, I found Stu's email from the purchase order and dropped him a line.  It seems (and I'm waiting for confirmation from Stu) that after the purchase of the dock extension is made 1) there's a lag between the purchase and the acknowledgement of the purchase 2) After the acknowledgement is received I'm not forcing a reload of the dock or any of the other stuff that needs to happen.  The simple fix for him should have been a Reboot or a Force Close of the app.

I believe that in the time between the purchase and the review, the app wasn't restarted and therefore the extension was never fully 'activated'.  The code change was relatively simple and hopefully other people who purchase the extension (and future extensions) will not have the same problems that Stu experienced.  My apologies to Stu and any other users who experienced the same kinds of issues.

Tuesday, January 24, 2012

Update Round-up

I've been neglecting the blog lately although I've been rolling out updates in a steady stream.  After the last post, I started digging into the static location feature.  Most of the people who sent email asked "can I just enter a zip code".  Well, that would work for the 70% of people that are in the US, but having received emails from all over the world (Chile, Australia, UK, Austria and Poland just to name a few), I didn't want a solution that would only work in the states (I try not to be a narrow minded American).   Recently, I discovered Yahoo! PlaceFinder.  In the same web service fashion as the weather, you generate a HTTP request with the information and it returns an XML file of location information. Some other additional nice things that go with it, is that if you provide it a common city name (Newcastle for example has 8 locations in the states, at least 3 in the UK and one in Australia).  It will return you a list of XML nodes that I used for a dialog.  You can also add in a locale which will only return the relevant locations for that locale.

I was more than halfway though adding the static location feature in when I noticed that I started getting a steady stream of force close reports.  It seems that I wasn't checking for a NULL value when getting the location which caused the app to crash.  Fixing the error was pretty simple, but I had already made a number of changes that would need to be rolled back to release just the bug fix.  I decided to just plow though the finishing static location as I thought that would be faster.  All said,  I ended up getting about 45 reports in week from the last update until I got the error fixed.

Not sure when version 1.0.0.12 was released, but it fixed the NULL force close issue and added in the static location which can be used Never, Always or when your location can't be found (back up).

Version 1.0.0.13 was pretty much a maintenance release.  Just a number of little bugs (again from Force Close Reports) and other odds and ends that just needed to be cleaned up.

Version 1.0.0.14 (the latest) big change was fixing a bug with the location loop up.  Emailing back and forth with Christopher D, I ended up discovering that my my location look up hierarchy wasn't working as expected.  The idea was to try to use this list (if enabled) to get the location :

  1. Static Location
  2. Location Based on IP Address
  3. Get current location 
  4. Get a cached location
  5. Get back-up location
  6. Location can't be found (give up)
The his phone had a problem was with getting the current location so it continued on to the cached location.  That was where I started to find all kinds of problems.  I ended up making a lot of changed to how the cached location works and what to do with it when it finds it.  All in all it was pretty much a product of the rushing to get the static location out to the market.

The other thing I wanted to note was that I did set up a Google+ page for the Desk Clock Plus.  I don't use Google+ on a personal level (or any other social media for that matter), so I'm really not sure how it's all going to work yet.  I figure, quick updates, support and I guess it is another way to get in touch with me.  It's an experiment so we'll see what happens with it.  

Thursday, January 12, 2012

Location

I just quite didn't have time to post about yesterday's update and there's a bit of an overlap with the changes for today.  Yesterday's changes were some bugs reported by users.

The first one had to do with setting the Music button.  Apparently the ROM he's using has two different versions of Google Music installed.  It didn't matter which one he picked from the list, it always launched the older one.  I just had to adjust how I was finding and saving the intent.  While I'm thinking about the music button, over the life of Desk Clock Plus, there have a been a number of people who have emailed and said that music play {insert app here} doesn't show up in the list.  This has more to do with the other app than mine.  I'm trying to figure out what apps are registered to handle .MP3 files.


final String MP3_FILE = "/sdcard/media_api/music/SHORTMP3.mp3";
        Intent viewIntent = new Intent(Intent.ACTION_VIEW);
        Uri uri = Uri.fromParts("file", MP3_FILE, null);
        viewIntent.setDataAndType(uri, "audio/mp3");     
        Intent pickIntent = new Intent(Intent.ACTION_PICK_ACTIVITY);
        pickIntent.putExtra(Intent.EXTRA_INTENT, viewIntent);    
        startActivityForResult(pickIntent, MUSICPICKER);  


If the app isn't registered with the system to "view" a mp3, it doesn't show up in the list.  If anyone has a better way of doing this please let me know.

The other one which once again was reported by a pair of users with HP Touchpads saying that the display was way off.  Basically, the font sizes needed to be shrunk down the size of the font and weather icon to make everything fit.  Part of the major redesign when version 1.0 was released, all of the sizes, heights and widths were moved into one XML file.  This allowed me to very easily change everything to fit on to the Thouchpad.  Unfortunately, I didn't shrink the weather enough and the High/Low temp degree mark was pushed off the edge.  That was fixed in today's update...

So, the big thing for today's update is major improvement to finding your location.  Previously, I was relying on the last known location.  If I loop though everything and nothing knows where you're at then I'm forcing the device to update it's location.  I'm not 100% I'm happy with how all this works and it will probably be reexamined in the future.  Also, as it turns out the feature to use the IP address for the location wasn't working anymore (the web service I was using went away).  Fortunately, Yahoo had a replacement that I was able to use instead.

Finally, I also updated the "Immediate" time out to be more immediate.  As pointed out by Omniwolf in the comments, it was a little confusing / misleading.

Unless something comes up, I'm going to start on the static location tomorrow... Given the the changes I've made yesterday, I don't think that it's going to take me very long.