FORUMS
Remove All Ads from XDA

[TUTORIAL] How to add custom weather locations to the Sense Weather app!

847 posts
Thanks Meter: 258
 
By Berzerker7, Senior Member on 16th August 2010, 05:29 AM
Post Reply Email Thread
This is a tutorial on how to add custom locations to the Sense Weather app!

Step by step, pretty easy:

1. Download SQLite Database Browser (works with all OS')

2. Pull the following file off your phone (easiest way is using adb): /data/data/com.htc.provider.weather/files/WP_0409WWE.db

3. Open the db file in SQLite Browser.

4. Click on the "Browse Data" tab.

5. Next to "Table:" choose "locationlist"

6. Click on "New Record" on the top right, it should automatically create a blank one at the end of the list.

7. Double-click on the empty box under "code" and enter text in this format: NAM|US|<state>|<city> So, for example, NAM|US|NY|NEW YORK CITY (no spaces or line breaks after the block of text (you can have spaces in the city name))

8. Under "name", put the desired city name, such as "New York City" without any spaces or line breaks after the block of text.

9. Under "state", put the state name, such as "NY" in the same format as "name"

10. Under "timezone", put either 300, 360, 420, or 480 in, depending on what your timezone is:

Eastern time - 300
Central time - 360
Mountain time - 420
Pacific time - 480

11. Under "timezoneld", put either "America/New_York", "America/Chicago", "America/Denver", or "America/Los_Angeles" in, again, depending on the timezone you live in:

Eastern time - America/New_York
Central time - America/Chicago
Mountain time - America/Denver
Pacific time - America/Los_Angeles

That's it! Save it, push it back to /data/data/com.htc.provider.weather/files then reboot and you should be able to search for your town!

Special thanks to the guys who figured this out first (I don't remember your names, but thank you! :P)
Attached Thumbnails
Click image for larger version

Name:	customweather.jpg
Views:	474
Size:	25.9 KB
ID:	381159  
16th August 2010, 11:02 PM |#2  
Junior Member
Thanks Meter: 1
 
More
Nicely done. But I needed more. So I wrote a script that pulled the entire AccuWeather.com list of US cities and then pushed it into the db(about 40k). It does seem to make searching for cities a bit slower, but it now has everything in the US.

By the way, I'm not sure if the timezone data matters much, so for now I just made everything Los Angeles.
Attached Files
File Type: zip weather.zip - [Click for QR Code] (1.18 MB, 108 views)
17th August 2010, 02:23 AM |#3  
UndergroundWire's Avatar
Member
Flag Oakland Gardens, NY
Thanks Meter: 7
 
More
Quote:
Originally Posted by dhalem

Nicely done. But I needed more. So I wrote a script that pulled the entire AccuWeather.com list of US cities and then pushed it into the db(about 40k). It does seem to make searching for cities a bit slower, but it now has everything in the US.

How much slower will this data be. Is it noticeable?
17th August 2010, 02:45 AM |#4  
OP Senior Member
Thanks Meter: 258
 
More
Quote:
Originally Posted by dhalem

Nicely done. But I needed more. So I wrote a script that pulled the entire AccuWeather.com list of US cities and then pushed it into the db(about 40k). It does seem to make searching for cities a bit slower, but it now has everything in the US.

By the way, I'm not sure if the timezone data matters much, so for now I just made everything Los Angeles.

It does matter, my auto-time is defaulting to GMT -7 (Los Angeles)
17th August 2010, 04:00 AM |#5  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by Berzerker7

It does matter, my auto-time is defaulting to GMT -7 (Los Angeles)

Interesting. In the weather app or elsewhere? I'll have to make the script smarter then.
17th August 2010, 05:31 AM |#6  
Junior Member
Thanks Meter: 0
 
More
Thanks for this I've been looking for this forever. Now I just need to figure out how to stop the weather app from always geolocating.

Sent from my ADR6300 using XDA App
17th August 2010, 05:39 AM |#7  
Member
Flag Detroit, MI
Thanks Meter: 14
 
Donate to Me
More
Quote:
Originally Posted by dhalem

Interesting. In the weather app or elsewhere? I'll have to make the script smarter then.

I'm in the EST timezone and my calender events were off by 3 hours after changing the database file.
17th August 2010, 06:49 AM |#8  
OP Senior Member
Thanks Meter: 258
 
More
It forces GMT -7 when setting the date/time to "automatic." But even if I set it to manual and use the correct timezone, the clock/weather widget always uses the GMT -7 timezone.
17th August 2010, 12:28 PM |#9  
UndergroundWire's Avatar
Member
Flag Oakland Gardens, NY
Thanks Meter: 7
 
More
Not to sound ungrateful to dhalem, but what is the point of loading all the cities for the average user?

It is much easier to follow the first post and add what is missing for you. For example, I added my work and home because it always defaulted to "Current Location".

I only say this because the difference in file size is a big jump.
17th August 2010, 12:30 PM |#10  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by UndergroundWire

Not to sound ungrateful to dhalem, but what is the point of loading all the cities for the average user?

It is much easier to follow the first post and add what is missing for you. For example, I added my work and home because it always defaulted to "Current Location".

I only say this because the difference in file size is a big jump.

Because to me, adding them one at a time is a pain. And the database they ship is so sparse that it's unlikely to have what you want.
The Following User Says Thank You to dhalem For This Useful Post: [ View ] Gift dhalem Ad-Free
17th August 2010, 12:45 PM |#11  
UndergroundWire's Avatar
Member
Flag Oakland Gardens, NY
Thanks Meter: 7
 
More
Quote:
Originally Posted by dhalem

Because to me, adding them one at a time is a pain. And the database they ship is so sparse that it's unlikely to have what you want.

I think you are misunderstanding me. What I mean is every user just adds what is missing. I was missing my work location and home location. They were showing up as "Current Location" rather than my city. I only had to add two instead of every US City.

The directions were straight forward. It was very easy to add the two that I needed.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes