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:

 http://www.google.com/ig/api?weather=city_name ,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

Hi,

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
(out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
/usr/bin/ld: 
out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o):
in function thread_store_set:system/core/libcutils/threads.c:36:
error: undefined reference to 'pthread_key_create'
/usr/bin/ld: 
out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o):
in function thread_store_set:system/core/libcutils/threads.c:44:
error: undefined reference to 'pthread_setspecific'
/usr/bin/ld: 
out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o):
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 http://alldroid.org/download/file.php?id=1374
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
su
Mount -o remount,rw /dev/mtd/mtdblock6 /system

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

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

cp /system/lib/libdvm.so /sdcard/dalbk/

cp /system/lib/libnativehelper.so /sdcard/dalbk/

cd /sdcard/jit/bin

cp -f dalvikvm /system/bin/ busybox

chmod 755 /system/bin/dalvikvm

Cd ..

cp -f libdvm.so /system/lib/

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

sync

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

Reboot

11. Done

Dalam proses akan ada reboot..

WARNING...bukan buat yg ragu2!!..do 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
suri...

*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?