How to get the current city/country name?

by Kakyoin » Tue, 25 Nov 2008 18:11:06 GMT

Sponsored Links
 Is it possible to get the city name(I mean the city where the phone is
in at the current time)?

I need it as a parameter for google weather API, like this: ,country_name

I tried browsing the classes in "android.location" package but have
yet to find a method to get the 'exact city name' and country name
needed for google weather API.

Thank you in advance. =)

Other Threads

1. Error in compiling android source under ubuntu 9.10


I have download android source to ubuntu 9.10.
And when i 'make', it runs fine for a while.  And then I get see this error:

host Executable: aapt
in function thread_store_set:system/core/libcutils/threads.c:36:
error: undefined reference to 'pthread_key_create'
in function thread_store_set:system/core/libcutils/threads.c:44:
error: undefined reference to 'pthread_setspecific'
in function thread_store_get:system/core/libcutils/threads.c:27:
error: undefined reference to 'pthread_getspecific'
collect2: ld returned 1 exit status

Can someone please tell me how can I fix it?

Thank you.


2. JIT in Milestone

apa itu JIT? JIT is Just In Time...adalah semacam compiler buat dalvik vm di
android yg bisa memboost speed android almost 100% performance...(katanya
loh..kekeke..dari yg saya baca.. ;-)..)

Cyanogen telah mengimplementasikan JIT ini di rom nexus cyanogen..hasilnya
rom nexus pun lebih bagus performancenya..

How to JIT in Milestone :

Tested on Root 2.0.1 sbf Hongkong file...
1. Download filenya di
2. Bikin folder JIT di sdcard..extract file diatas ke folder ini
3. Bukan cmd, masuk ke directory android sdk tools
4. Ketik adb pull /system/build.prop c:
5. Buka file build.prop yg sdh kita pull di c: (pakai wordpad)
6. Di baris terakhir tambahkan 'dalvik.vm.execution-mode=int:jit' (tanpa
tanda quot) save
7. Copy file build.prop yg kita edit ke folder sdcard/jit
8. Balik ke command prompt
9. Ketik adb shell
10. Ketik
Mount -o remount,rw /dev/mtd/mtdblock6 /system

cp /system/build.prop /sdcard/dalbk/

cp /system/bin/dalvikvm /sdcard/dalbk/

cp /system/lib/ /sdcard/dalbk/

cp /system/lib/ /sdcard/dalbk/

cd /sdcard/jit/bin

cp -f dalvikvm /system/bin/ busybox

chmod 755 /system/bin/dalvikvm

Cd ..

cp -f /system/lib/

cp -f /system/lib/ cat build.prop >/system/build.prop


mount -o remount,ro /dev/mtd/mtdblock6 /system


11. Done

Dalam proses akan ada reboot..

WARNING...bukan buat yg ragu2!! it on your own risk..

Tested on Milestone UK dgn fw 2.0.1 hongkong ROOTED!!

Walau bootloader Motorola unbrickable..tapi tetep aja ada resiko mati

*klo mati suri bisa hajar pakai Rsd Lite lagi...kekekekekeke....

"Indonesian Android Community [id-android]" 

3. N1 Cyanogen beta3

4. problem with TabHost

5. auto killer tas

6. Astro File Manager mau expired.

7. How to customize taskbar? i.e. change color to black?