Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,801 Members 44,406 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
TechnoLover
Old
(Last edited by TechnoLover; 10th April 2011 at 12:10 AM.) Reason: Root Explorer && SQLite Editor
#1  
TechnoLover's Avatar
Member - OP
Thanks Meter 30
Posts: 32
Join Date: Jul 2010
Lightbulb [HOW-TO] Add your City in MIUI Weather App

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:
Select 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:	1854
Size:	34.2 KB
ID:	554085   Click image for larger version

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

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

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

Name:	step_1x7bz.jpg
Views:	942
Size:	50.7 KB
ID:	554089  

Click image for larger version

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

Name:	step_1k7je.jpg
Views:	1092
Size:	60.7 KB
ID:	554091  
The Following 9 Users Say Thank You to TechnoLover For This Useful Post: [ Click to Expand ]
 
anghe
Old
#2  
Junior Member
Thanks Meter 2
Posts: 19
Join Date: Nov 2009
I don't know Vietnam Post ID so MIUI weather fail to update.
 
mobiousdigital
Old
#3  
mobiousdigital's Avatar
Senior Member
Thanks Meter 7
Posts: 671
Join Date: Feb 2010

 
DONATE TO ME
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.
MIUI Translation / Discussion
Join us on irc.freenode.net #MIUI
All developers, translators, users welcome

For full MIUI updates please visit: forums.miui-dev.com

Donate if i've helped you out - the money is going towards a new system as my current laptops dying.



The Following User Says Thank You to mobiousdigital For This Useful Post: [ Click to Expand ]
 
smstutler
Old
#4  
Senior Member
Thanks Meter 12
Posts: 476
Join Date: Mar 2010
Location: Marion Iowa
Damn thank god for the polite dev's. Why not explain this to him nice instead of being an ass ?
 
mode_ss
Old
#5  
Junior Member
Thanks Meter 0
Posts: 22
Join Date: Oct 2010
Location: Santo Domingo

 
DONATE TO ME
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!!
 
pzengota
Old
#6  
pzengota's Avatar
Junior Member
Thanks Meter 10
Posts: 22
Join Date: Nov 2010
Location: Norwalk, CT
I was going to install this app, but after the absolutely putrid attitude of the dev above, I will not. Sorry, pal.
 
Fisher_9511
Old
#7  
Member
Thanks Meter 2
Posts: 37
Join Date: Aug 2010
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.
 
MusicalQueen
Old
#8  
MusicalQueen's Avatar
Member
Thanks Meter 2
Posts: 53
Join Date: May 2010
Location: On the back of my Ducati
WOW that was rude
I am going to stop flashing early tonight and spend some
quality time with my boyfriend
because I am a good girlfriend
and I left my phone
charger at work
 
tkjeeper
Old
#9  
tkjeeper's Avatar
Senior Member
Thanks Meter 851
Posts: 2,882
Join Date: Jan 2011
Quote:
Originally Posted by mobiousdigital View Post
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.
 
ermacwins
Old
#10  
ermacwins's Avatar
Senior Member
Thanks Meter 668
Posts: 3,787
Join Date: Aug 2009

 
DONATE TO ME
Quote:
Originally Posted by mobiousdigital View Post
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
LG Nexus 4: AOSPAL 4.0 [BETA6] 20140222
Samsung Galaxy SII: AOSP NeatROM v2.8
LG G PAD 8.3: Paranoid Android 4.1 Beta 2
iPad 2


http://forum.xda-developers.com/show...8#post44803298

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes