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

Search This thread

Berzerker7

Senior Member
Jan 17, 2010
847
257
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)
 

Attachments

  • customweather.jpg
    customweather.jpg
    25.9 KB · Views: 475
Last edited:

dhalem

Member
Aug 8, 2010
10
1
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.
 

Attachments

  • weather.zip
    1.2 MB · Views: 109
Last edited:

Berzerker7

Senior Member
Jan 17, 2010
847
257
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)
 

spaceman4

Member
Jun 24, 2010
15
0
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
 

Berzerker7

Senior Member
Jan 17, 2010
847
257
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.
 

UndergroundWire

Senior Member
Jul 1, 2010
88
7
Oakland Gardens, NY
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.
 

dhalem

Member
Aug 8, 2010
10
1
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.
 
  • Like
Reactions: GroovyGeek

UndergroundWire

Senior Member
Jul 1, 2010
88
7
Oakland Gardens, NY
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.
 

sd_042

Member
Aug 1, 2010
47
2
Possibly silly question...

Anyone know the format of the Latitude and Longitude?
Is it the same as Google Maps? i.e. Decimal format: 40.7864, -73.9663 for midtown Manhattan?

Thanks!
 

heffe2001

Senior Member
Jun 9, 2010
274
32
This should be the default one. I'm running the evo framework frankenbuild, if that matters (should be the same DB though).
 

Attachments

  • WP_0409WWE.zip
    124.6 KB · Views: 43

dhalem

Member
Aug 8, 2010
10
1
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.

Yeah, but I also like to be able to look at weather in cities I'm travelling to soon, cities where my family lives, etc.

I'm cooking a new version with correct timezones now.
 

Optimaximal

New member
Aug 17, 2010
1
0
Maybe I'm being blind or am just out of my depth wrt this, but I'm not finding the file on my EU HTC Desire running 2.2.

Granted I'm using ASTRO to try and find the file & I don't have root on the device. The mentioned data directory is just empty (although I guess files/folders may be hidden).

All help appreciated.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    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.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone