Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[HOW-TO] Add your City in MIUI Weather App

OP TechnoLover

28th March 2011, 11:05 AM   |  #1  
TechnoLover's Avatar
OP Member
Thanks Meter: 30
 
32 posts
Join Date:Joined: Jul 2010
Hello everybody,

when I searched the web for a tutorial how to add a city to MIUI-Weather app and found nothing yet, I started to try to add my own city to the database of MIUI. I was succesful and I thought that it would be a good idea to write a tutorial how to add your own city to the db.

You need the following:
  • root
  • SQLite Database Browser: sourceforge.net/projects/sqlitebrowser/
  • OR Root Explorer && SQlite Editor (thanks to Fisher_9511)

I'm not responsible if you damage your phone, brick it or it does not start anymore. You're the one who's responsible for your device. You should know what you do

I explain the process on the database of Europe and Germany, because there's nothing added for Germany.

First thing to do is to download the database of your desired location. Save it somewhere where you find it again. Now start "SQLite Database Browser" and open the database. It should now look like thid (Attached Image 1). Switch to the tab "Browse Data" and select "hotcity" as the table (Attached Image 2).

Now search for the abbreviation of your country, in my case it's "DE" for "Deutschland" (Germany). Remember the abbreviation and the posID of your country. So in my case I need "DE" and "110000001"

Now head over to weather.com and search for your city, where you live in. In my case I search for "Cloppenburg, Germany". Now you should have an url like this: "weather.com/weather/today/GMXX0017:1:GM". The part which is necessary is "GMXX0017", the GM stands for Germany, the XX is a placeholder I think and 0017 is the ID we need.

Now we have the posID of our country and the ID of our city. Now we have to sum the posID and the ID of our city. In my case it's "110000001" + "0017" which ends up in "110000018". This is the posID for our city.

Now we switch back again to our SQLite Database Browser and select "city" as our table (Attached Image 3). Now we have to go to the last page (Attached Image 7) and look for the last ID used in the database. In my case it's "16619" (Attached Image 4), so the next ID is "16620".

Now we create a new record and insert all our information we have, this happens when you double click the specific field of the new added empty line.
This should look like this (Attached Image 5).

When you entered every information it should look like this (Attached Image 6). Save your database and push it back to your device.
Code:
adb push miui_city_entire_eu.db /data/data/com.miui.weather/databases/miui_city.db
Now you should be able to select your city in the weather app and use the app effeicient.

(I hope it was the right forum (: )
Attached Thumbnails
Click image for larger version

Name:	step_1qcl2.jpg
Views:	1872
Size:	34.2 KB
ID:	554085   Click image for larger version

Name:	step_1173p.jpg
Views:	1376
Size:	47.2 KB
ID:	554086   Click image for larger version

Name:	step_157eg.jpg
Views:	1098
Size:	59.4 KB
ID:	554087   Click image for larger version

Name:	step_1e74l.jpg
Views:	1417
Size:	65.1 KB
ID:	554088   Click image for larger version

Name:	step_1x7bz.jpg
Views:	958
Size:	50.7 KB
ID:	554089   Click image for larger version

Name:	step_1zunw.jpg
Views:	936
Size:	40.0 KB
ID:	554090   Click image for larger version

Name:	step_1k7je.jpg
Views:	1105
Size:	60.7 KB
ID:	554091  
Last edited by TechnoLover; 10th April 2011 at 01:10 AM. Reason: Root Explorer && SQLite Editor
The Following 9 Users Say Thank You to TechnoLover For This Useful Post: [ View ]
30th March 2011, 06:03 AM   |  #2  
Junior Member
Thanks Meter: 2
 
19 posts
Join Date:Joined: Nov 2009
I don't know Vietnam Post ID so MIUI weather fail to update.
5th April 2011, 09:30 PM   |  #3  
mobiousdigital's Avatar
Senior Member
Thanks Meter: 7
 
671 posts
Join Date:Joined: Feb 2010
Donate to Me
More
Talking LOL!
Well, to be honest, this is not the full part of the issue, there is more backend to this app which you have no clue about.

Good luck with your inaccurate ramblings about the id's.

We actually made those up and make it correspond to our backend system for picking up data.

Therefore if the PosID is not in our backend the app wont work anyway! So, everything you've said is a load of crap :)

If the PosID was to conform we'd have to add them to the backend system and also in addition to this in order of the last valid posIDs not your own.

Could an admin please close this thread down! it's heading no where without the MIUI-DEV backend anyway so its pointless chatter.
The Following User Says Thank You to mobiousdigital For This Useful Post: [ View ]
5th April 2011, 09:38 PM   |  #4  
Senior Member
Flag Marion Iowa
Thanks Meter: 12
 
476 posts
Join Date:Joined: Mar 2010
More
Damn thank god for the polite dev's. Why not explain this to him nice instead of being an ass ?
5th April 2011, 10:06 PM   |  #5  
Junior Member
Flag Santo Domingo
Thanks Meter: 0
 
22 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Why are you so rude with this guy, mobiusdigital?? he is just trying to make that app a little better, for those who desire more of it!! It's not neccesary for you to be such an indecent person, not even if you were the master developer for that app...

I think you should appologize "Technolover"... Beeing a "professional" dev. (as I think you are), also demands to be more polite... there are other ways to say the things you just wrote... or is that everyone in your country are that rude?? Gosh!!
5th April 2011, 10:37 PM   |  #6  
pzengota's Avatar
Junior Member
Flag Norwalk, CT
Thanks Meter: 10
 
22 posts
Join Date:Joined: Nov 2010
More
I was going to install this app, but after the absolutely putrid attitude of the dev above, I will not. Sorry, pal.
6th April 2011, 12:02 AM   |  #7  
Member
Thanks Meter: 2
 
37 posts
Join Date:Joined: Aug 2010
More
Followed all instructions to the letter, but the MIUI weather app won't open, well I hope that MIUI Devs will add some functionnality to MIUI Weather to add our own cities, or something similar.

for the record
using HTC HD2, with last MIUI and living in France.
6th April 2011, 10:39 AM   |  #8  
MusicalQueen's Avatar
Member
Flag On the back of my Ducati
Thanks Meter: 2
 
53 posts
Join Date:Joined: May 2010
More
WOW that was rude
6th April 2011, 09:13 PM   |  #9  
tkjeeper's Avatar
Senior Member
Thanks Meter: 932
 
3,000 posts
Join Date:Joined: Jan 2011
Quote:
Originally Posted by mobiousdigital

Well, to be honest, this is not the full part of the issue, there is more backend to this app which you have no clue about.

Good luck with your inaccurate ramblings about the id's.

We actually made those up and make it correspond to our backend system for picking up data.

Therefore if the PosID is not in our backend the app wont work anyway! So, everything you've said is a load of crap :)

If the PosID was to conform we'd have to add them to the backend system and also in addition to this in order of the last valid posIDs not your own.

Could an admin please close this thread down! it's heading no where without the MIUI-DEV backend anyway so its pointless chatter.

Very helpful, this is the kind of help everyone looks for, brilliant.
6th April 2011, 10:15 PM   |  #10  
ermacwins's Avatar
Senior Member
Thanks Meter: 683
 
3,815 posts
Join Date:Joined: Aug 2009
Donate to Me
Quote:
Originally Posted by mobiousdigital

Well, to be honest, this is not the full part of the issue, there is more backend to this app which you have no clue about.

Good luck with your inaccurate ramblings about the id's.

We actually made those up and make it correspond to our backend system for picking up data.

Therefore if the PosID is not in our backend the app wont work anyway! So, everything you've said is a load of crap :)

If the PosID was to conform we'd have to add them to the backend system and also in addition to this in order of the last valid posIDs not your own.

Could an admin please close this thread down! it's heading no where without the MIUI-DEV backend anyway so its pointless chatter.

Oh look, its the clown who thinks he owns miui. He wanted to sell the weather widget because he done a few dirty hacks. Also he was considering to sell some language packs. Myself and others co confronted him and our posts got deleted and I got banned.

You should see his attitude in miui-dev

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes