Showing posts with label location. Show all posts
Showing posts with label location. 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.


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.

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.

Friday, December 9, 2011

Two Quick Updates

So version 1.0.0.5 was pushed to the market yesterday and 1.0.0.6 a little while ago.  Not too much new with these, mostly minor bug fixes based upon emails and the force close reports that Google gives me.  Here's the details of what's fixed:

  • Slide Show - There looks to have been a slight timing error with the loading of the images and the slide show starting that would cause to hang and the "Loading.  Please wait..." dialog.  Some code rearrangement, additional checks and more messages should give a better user interface experience and fix the problem.
  • Purchase Service FC - This might account for some of the "random force closes".  Looking at the logs, the purchase service apparently doesn't always receive an intent when it's started.  It then causes a Force Close.  I find this odd as this is Google code that I'm sure other people are using and I don't know why the bug is in the example.  I simply and checking and catching the parsing of the intent.  Hopefully I stop getting error logs about this.
  • Screen Saver - The timer wasn't being set when the application was loaded.  It was only started if you left the main screen (opened the preferences for example) and came back.
  • Weather Display - I fixed a minor display bug that was happening on some devices.
  • Location - I've got a couple users who are have location issues.  I previously tried to fix it with some additional permissions, but that still doesn't seem to be fixing it.  So there's a new option in the Weather settings screen for "Location Error Messages".  This will display toast messages when it tries and fails to get your location based on what ever service.  Hopefully this will help me figure out how to fix the problem(s).  I may also be having problems with the "Use IP address" feature and I need to email someone about that.
I think that takes care of all the things that are broken from the major changes that happened going to the version 1.0 release.  So hopefully this will mean less updates and will allow me to work on additional new development instead of the "fire fighting" fixing issues.

Thursday, December 1, 2011

Quick Fixes

Version 1.0.0.3 is in the market.  Just a couple of things fixed:

  • Picasa - This probably didn't effect too many people, but it was a bug when you had Picasa images chosen for the background, but didn't choose any Albums
  • Weather and Location - I'm now holding on to the weather and location information so I don't have to look it up all the time.  This should make rotation and weather update refreshes faster.