getLocation() function failing inside AsyncTask - android

Here's my breakdown: I have a class called UserLocation where I perform all Location events. Within this class I have a function, public Location getLocation(Context context) , where I check for Location providers, get locations from all available providers, and return the most accurate. Now I want to use this function inside an AsyncTask in my SplashScreen Activity. I have been reading several resources that I need to call a Looper.prepare() at the beginning of my doInBackground method and Looper.loop() at the end of the method. However, I cannot get it to work properly. I have scanned my logcat and the line that sticks out to me is Looper.loop() line: 137
Splash Activity: (modified slightly to avoid garbage)
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.splash_layout);
new LoadData().execute();
}
class LoadData extends AsyncTask <Void, Integer, Void> {
private final int prgTitle[] = { R.string.Checking_Service,
R.string.fetching_location,
R.string.Location_got,
R.string.Connect_Database};
private final int prgNums[] = {0, 10, 25, 50, 85,};
private int index;
#Override
public void onPreExecute() {
int max = 0;
for (final int p : prgNums){
max += p;
}
pBar.setMax(max);
index = 0;
}
#Override
protected Void doInBackground(Void...params) {
if(usrLoc.canGetLocation = true){
usrLoc.getLocation(mContext);
}
if(usrLoc.latitude != Double.NaN){
//do stuff
}
return null;
}
protected void onProgressUpdate(Void... loadingValues) {
pBarText.setText(prgTitle[index]);
pBar.incrementProgressBy(prgNums[index]);
++index;
publishProgress();
}
protected void onPostExecute(){
usrLoc.stopUsingGPS();
}
}
EDIT: LogCat Posted
12-10 14:26:00.434: D/AndroidRuntime(894): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
12-10 14:26:00.434: D/AndroidRuntime(894): CheckJNI is ON
12-10 14:26:01.272: D/AndroidRuntime(894): Calling main entry com.android.commands.pm.Pm
12-10 14:26:01.312: D/AndroidRuntime(894): Shutting down VM
12-10 14:26:01.332: I/AndroidRuntime(894): NOTE: attach of thread 'Binder Thread #3' failed
12-10 14:26:01.342: D/dalvikvm(894): GC_CONCURRENT freed 101K, 78% free 462K/2048K, paused 1ms+2ms
12-10 14:26:01.342: D/dalvikvm(894): Debugger has detached; object registry had 1 entries
12-10 14:26:01.932: D/AndroidRuntime(907): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
12-10 14:26:01.932: D/AndroidRuntime(907): CheckJNI is ON
12-10 14:26:02.864: D/AndroidRuntime(907): Calling main entry com.android.commands.am.Am
12-10 14:26:02.892: I/ActivityManager(91): Force stopping package com.book.swap uid=10040
12-10 14:26:02.892: W/ActivityManager(91): Force removing ActivityRecord{41785ec8 com.book.swap/.SplashScreen}: app died, no saved state
12-10 14:26:02.892: I/Process(91): Sending signal. PID: 877 SIG: 9
12-10 14:26:02.922: W/NetworkManagementSocketTagger(91): setKernelCountSet(10040, 0) failed with errno -2
12-10 14:26:02.992: W/NetworkManagementSocketTagger(91): setKernelCountSet(10005, 1) failed with errno -2
12-10 14:26:03.022: I/ActivityManager(91): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.book.swap/.SplashScreen} from pid 907
12-10 14:26:03.073: I/WindowManager(91): createSurface Window{41af7978 com.android.launcher/com.android.launcher2.Launcher paused=false}: DRAW NOW PENDING
12-10 14:26:03.092: W/WindowManager(91): Failure taking screenshot for (240x394) to layer 21005
12-10 14:26:03.102: D/AndroidRuntime(907): Shutting down VM
12-10 14:26:03.152: I/AndroidRuntime(907): NOTE: attach of thread 'Binder Thread #3' failed
12-10 14:26:03.163: D/dalvikvm(907): GC_CONCURRENT freed 101K, 77% free 485K/2048K, paused 1ms+1ms
12-10 14:26:03.163: D/jdwp(907): Got wake-up signal, bailing out of select
12-10 14:26:03.163: D/dalvikvm(907): Debugger has detached; object registry had 1 entries
12-10 14:26:03.191: D/dalvikvm(918): Not late-enabling CheckJNI (already on)
12-10 14:26:03.202: I/WindowManager(91): createSurface Window{41a24bd0 Starting com.book.swap paused=false}: DRAW NOW PENDING
12-10 14:26:03.222: I/ActivityManager(91): Start proc com.book.swap for activity com.book.swap/.SplashScreen: pid=918 uid=10040 gids={3003}
12-10 14:26:03.522: W/NetworkManagementSocketTagger(91): setKernelCountSet(10040, 1) failed with errno -2
12-10 14:26:03.662: W/ActivityThread(918): Application com.book.swap is waiting for the debugger on port 8100...
12-10 14:26:03.672: I/System.out(918): Sending WAIT chunk
12-10 14:26:03.682: I/dalvikvm(918): Debugger is active
12-10 14:26:03.872: I/System.out(918): Debugger has connected
12-10 14:26:03.872: I/System.out(918): waiting for debugger to settle...
12-10 14:26:04.072: I/System.out(918): waiting for debugger to settle...
12-10 14:26:04.202: I/WindowManager(91): createSurface Window{41adaa20 Waiting For Debugger paused=false}: DRAW NOW PENDING
12-10 14:26:04.272: I/System.out(918): waiting for debugger to settle...
12-10 14:26:04.498: I/System.out(918): waiting for debugger to settle...
12-10 14:26:04.692: I/System.out(918): waiting for debugger to settle...
12-10 14:26:04.904: I/System.out(918): waiting for debugger to settle...
12-10 14:26:05.102: I/System.out(918): waiting for debugger to settle...
12-10 14:26:05.122: W/InputManagerService(91): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#417c64e8
12-10 14:26:05.355: I/System.out(918): waiting for debugger to settle...
12-10 14:26:05.619: I/System.out(918): waiting for debugger to settle...
12-10 14:26:05.822: I/System.out(918): waiting for debugger to settle...
12-10 14:26:06.065: I/System.out(918): waiting for debugger to settle...
12-10 14:26:06.287: I/System.out(918): waiting for debugger to settle...
12-10 14:26:06.513: I/System.out(918): debugger has settled (1427)
12-10 14:26:13.132: W/ActivityManager(91): Launch timeout has expired, giving up wake lock!
12-10 14:26:13.597: W/ActivityManager(91): Activity idle timeout for ActivityRecord{418af8c8 com.book.swap/.SplashScreen}
12-10 14:31:31.391: A/NetworkStats(91): problem reading network stats
12-10 14:31:31.391: A/NetworkStats(91): java.lang.IllegalStateException: problem parsing line: null
12-10 14:31:31.391: A/NetworkStats(91): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:313)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.server.NetworkManagementService.getNetworkStatsUidDetail(NetworkManagementService.java:1271)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:810)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.server.net.NetworkStatsService.performPoll(NetworkStatsService.java:771)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.server.net.NetworkStatsService.access$100(NetworkStatsService.java:128)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.server.net.NetworkStatsService$3.onReceive(NetworkStatsService.java:610)
12-10 14:31:31.391: A/NetworkStats(91): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
12-10 14:31:31.391: A/NetworkStats(91): at android.os.Handler.handleCallback(Handler.java:605)
12-10 14:31:31.391: A/NetworkStats(91): at android.os.Handler.dispatchMessage(Handler.java:92)
12-10 14:31:31.391: A/NetworkStats(91): at android.os.Looper.loop(Looper.java:137)
12-10 14:31:31.391: A/NetworkStats(91): at android.os.HandlerThread.run(HandlerThread.java:60)
12-10 14:31:31.391: A/NetworkStats(91): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)
12-10 14:31:31.391: A/NetworkStats(91): at libcore.io.IoBridge.open(IoBridge.java:406)
12-10 14:31:31.391: A/NetworkStats(91): at java.io.FileInputStream.<init>(FileInputStream.java:78)
12-10 14:31:31.391: A/NetworkStats(91): at java.io.FileReader.<init>(FileReader.java:42)
12-10 14:31:31.391: A/NetworkStats(91): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:272)
12-10 14:31:31.391: A/NetworkStats(91): ... 10 more
12-10 14:31:31.391: A/NetworkStats(91): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
12-10 14:31:31.391: A/NetworkStats(91): at libcore.io.Posix.open(Native Method)
12-10 14:31:31.391: A/NetworkStats(91): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:98)
12-10 14:31:31.391: A/NetworkStats(91): at libcore.io.IoBridge.open(IoBridge.java:390)
12-10 14:31:31.391: A/NetworkStats(91): ... 13 more

Related

How to connect the Bluetooth device in Android

I reference and imitates the Android Sample at android-sdks\samples\android-18\legacy\BluetoothLeGatt to developing an application.
I can scan the device.
But the app crash when I try to connect the bluetooth device.
This is the log that the app crash when I try to connect the bluetooth device.
D/BtGatt.btif( 2443): btif_gattc_scan
D/BtGatt.btif( 2443): btgattc_handle_event: Event 1003
D/BtGatt.GattService( 2443): unregisterClient() - clientIf=4
D/BtGatt.btif( 2443): btif_gattc_unregister_app
D/BtGatt.btif( 2443): btgattc_handle_event: Event 1001
D/BtGatt.btif( 2443): btif_gattc_upstreams_evt: Event 1
I/ActivityManager( 1766): START u0 {cmp=com.example.prevent_the_lost/.DeviceControl (has extras)} from pid 5526
W/WindowManager( 1766): Screenshot failure taking screenshot for (166x125) to layer 21015
I/bt-hci ( 2443): BLE HCI(id=62) event = 0x02)
I/bt-hci ( 2443): btu_ble_process_adv_pkt
D/BluetoothAdapter( 5526): stopLeScan()
I/bt-hci ( 2443): BLE HCI(id=62) event = 0x02)
I/bt-hci ( 2443): btu_ble_process_adv_pkt
D/dalvikvm( 5526): GC_CONCURRENT freed 165K, 5% free 4427K/4624K, paused 1ms+1ms, total 5ms
W/ActivityManager( 1766): Unable to start service Intent { cmp=com.example.prevent_the_lost/.BluetoothLeService } U=0: not found
I/ActivityManager( 1766): Displayed com.example.prevent_the_lost/.DeviceControl: +29ms
D/AndroidRuntime( 5526): Shutting down VM
W/dalvikvm( 5526): threadid=1: thread exiting with uncaught exception (group=0x94ee8648)
E/AndroidRuntime( 5526): FATAL EXCEPTION: main
E/AndroidRuntime( 5526): java.lang.NullPointerException
E/AndroidRuntime( 5526): at com.example.prevent_the_lost.DeviceControl.onOptionsItemSelected(DeviceControl.java:140)
E/AndroidRuntime( 5526): at android.app.Activity.onMenuItemSelected(Activity.java:2566)
E/AndroidRuntime( 5526): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:986)
E/AndroidRuntime( 5526): at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
E/AndroidRuntime( 5526): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
E/AndroidRuntime( 5526): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
E/AndroidRuntime( 5526): at com.android.internal.view.menu.ActionMenuView.invokeItem(ActionMenuView.java:547)
E/AndroidRuntime( 5526): at com.android.internal.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:115)
E/AndroidRuntime( 5526): at android.view.View.performClick(View.java:4240)
E/AndroidRuntime( 5526): at android.view.View$PerformClick.run(View.java:17721)
E/AndroidRuntime( 5526): at android.os.Handler.handleCallback(Handler.java:730)
E/AndroidRuntime( 5526): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 5526): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 5526): at android.app.ActivityThread.main(ActivityThread.java:5103)
E/AndroidRuntime( 5526): at java.lang.reflect.Method.invokeNative(NativeMethod)
E/AndroidRuntime( 5526): at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime( 5526): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime( 5526): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 5526): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1766): Force finishing activity com.example.prevent_the_lost/.DeviceControl
W/WindowManager( 1766): Screenshot failure taking screenshot for (166x125) to layer 21020
W/ActivityManager( 1766): Activity pause timeout for ActivityRecord{4aad960c u0com.example.prevent_the_lost/.DeviceControl}
I/Process ( 5526): Sending signal. PID: 5526 SIG: 9
W/InputDispatcher( 1766): channel '4aaa49ec com.example.prevent_the_lost/com.example.prevent_the_lost.Device_List (server)' ~ Consumer closed input channel or an error occurred. events=0x9
E/InputDispatcher( 1766): channel '4aaa49ec com.example.prevent_the_lost/com.example.prevent_the_lost.Device_List (server)' ~ Channel is unrecoverably broken and will be disposed!
W/InputDispatcher( 1766): channel '4aa9c3e4 com.example.prevent_the_lost/com.example.prevent_the_lost.DeviceControl (server)' ~ Consumer closed input channel or an error occurred. events=0xd
E/InputDispatcher( 1766): channel '4aa9c3e4 com.example.prevent_the_lost/com.example.prevent_the_lost.DeviceControl (server)' ~ Channel is unrecoverably brokenand will be disposed!
W/InputDispatcher( 1766): Attempted to unregister already unregistered input channel '4aaa49ec com.example.prevent_the_lost/com.example.prevent_the_lost.Device_List (server)'
W/InputDispatcher( 1766): Attempted to unregister already unregistered input channel '4aa9c3e4 com.example.prevent_the_lost/com.example.prevent_the_lost.DeviceControl (server)'
I/ActivityManager( 1766): Process com.example.prevent_the_lost (pid 5526) has died.
I/WindowState( 1766): WIN DEATH: Window{4aaa49ec u0 com.example.prevent_the_lost/com.example.prevent_the_lost.Device_List}
I/WindowState( 1766): WIN DEATH: Window{4aa9c3e4 u0 com.example.prevent_the_lost/com.example.prevent_the_lost.DeviceControl}
I/ActivityManager( 1766): Start proc com.example.prevent_the_lost for activity com.example.prevent_the_lost/.Device_List: pid=5545 uid=10043 gids={50043, 3001,3002, 1028}
I/ActivityThread( 5545): Switching default density from 160 to 130
D/BluetoothManagerService( 1766): Message: 20
D/BluetoothManagerService( 1766): Added callback: android.bluetooth.IBluetoothManagerCallback$Stub$Proxy#4ab1fee8:true
W/InputMethodManagerService( 1766): Got RemoteException sending setActive(false) notification to pid 5526 uid 10043
I/ActivityManager( 1766): Displayed com.example.prevent_the_lost/.Device_List: +171ms
D/dalvikvm( 1766): GC_CONCURRENT freed 455K, 19% free 7301K/8980K, paused 1ms+1ms, total 12ms
I don't know what the error in this Log ??
Could somebody tell me the error and how to solve it ???
Thanks a lot!!!
I find the error is "Unable to start service Intent"
The solution is add the Service in Manifest -> Application.

Change Attached Source [duplicate]

This question already has answers here:
Source not found Android?
(5 answers)
Closed 9 years ago.
I have been debugging my android project but when i am trying to step into a braekpoint then a screen comes which says SOURCE NOT FOUND ....plz suggest a solution..i have seen previous suggestions but those didnt work....there is an option provided-- CHANGE ATTACHED SOURCE.. which source i have to provide?? i am providing the link for the video..it is ellaborated in the video..plz help...thanks in advance for ur answers
https://docs.google.com/file/d/0B_I2kWyZePW6VnhOLUxjTFhpTk0/edit?usp=sharing
this is what the log cat says:
04-15 11:15:02.380: D/AndroidRuntime(379): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-15 11:15:02.380: D/AndroidRuntime(379): CheckJNI is ON
04-15 11:15:02.490: D/AndroidRuntime(379): --- registering native functions ---
04-15 11:15:03.250: D/dalvikvm(284): GC_EXPLICIT freed 523 objects / 29592 bytes in 131ms
04-15 11:15:03.490: D/PackageParser(59): Scanning package: /data/app/vmdl55176.tmp
04-15 11:15:03.960: D/dalvikvm(59): GC_FOR_MALLOC freed 18707 objects / 974816 bytes in 89ms
04-15 11:15:04.030: I/PackageManager(59): Removing non-system package:com.drugindexx.demo
04-15 11:15:04.030: I/ActivityManager(59): Force stopping package com.drugindexx.demo uid=10040
04-15 11:15:04.030: I/Process(59): Sending signal. PID: 362 SIG: 9
04-15 11:15:04.050: W/InputManagerService(59): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#4507a590
04-15 11:15:04.440: D/PackageManager(59): Scanning package com.drugindexx.demo
04-15 11:15:04.440: I/PackageManager(59): Package com.drugindexx.demo codePath changed from /data/app/com.drugindexx.demo-1.apk to /data/app/com.drugindexx.demo- 2.apk; Retaining data and using new
04-15 11:15:04.450: I/PackageManager(59): /data/app/com.drugindexx.demo-2.apk changed; unpacking
04-15 11:15:04.471: D/installd(35): DexInv: --- BEGIN '/data/app/com.drugindexx.demo-2.apk' ---
04-15 11:15:04.820: D/dalvikvm(386): DexOpt: load 42ms, verify 205ms, opt 7ms
04-15 11:15:04.830: D/installd(35): DexInv: --- END '/data/app/com.drugindexx.demo-2.apk' (success) ---
04-15 11:15:04.830: W/PackageManager(59): Code path for pkg : com.drugindexx.demo changing from /data/app/com.drugindexx.demo-1.apk to /data/app/com.drugindexx.demo-2.apk
04-15 11:15:04.830: W/PackageManager(59): Resource path for pkg : com.drugindexx.demo changing from /data/app/com.drugindexx.demo-1.apk to /data/app/com.drugindexx.demo-2.apk
04-15 11:15:04.830: D/PackageManager(59): Activities: com.drugindexx.demo.jsonparsngactivity com.drugindexx.demo.LoginPage com.drugindexx.demo.Registration com.drugindexx.demo.UserDetails com.drugindexx.demo.MenuOptions com.drugindexx.demo.SarchIndx com.drugindexx.demo.jsonparsngactivity com.drugindexx.demo.Showdetails com.drugindexx.demo.SmsEx com.drugindexx.demo.Settings com.drugindexx.demo.AdvancedSearch com.drugindexx.demo.Gmap com.drugindexx.demo.MyItemizedOverlay com.drugindexx.demo.G
04-15 11:15:04.850: I/ActivityManager(59): Force stopping package com.drugindexx.demo uid=10040
04-15 11:15:04.950: I/installd(35): move /data/dalvik-cache/data#app#com.drugindexx.demo-2.apk#classes.dex -> /data/dalvik-cache/data#app#com.drugindexx.demo-2.apk#classes.dex
04-15 11:15:04.950: D/PackageManager(59): New package installed in /data/app/com.drugindexx.demo-2.apk
04-15 11:15:05.080: I/ActivityManager(59): Force stopping package com.drugindexx.demo uid=10040
04-15 11:15:05.140: D/dalvikvm(134): GC_EXPLICIT freed 69 objects / 2728 bytes in 50ms
04-15 11:15:05.390: W/RecognitionManagerService(59): no available voice recognition services found
04-15 11:15:05.490: D/dalvikvm(155): GC_EXPLICIT freed 1809 objects / 92640 bytes in 328ms
04-15 11:15:05.710: D/dalvikvm(59): GC_EXPLICIT freed 8511 objects / 535000 bytes in 199ms
04-15 11:15:05.710: I/installd(35): unlink /data/dalvik-cache/data#app#com.drugindexx.demo-1.apk#classes.dex
04-15 11:15:05.710: D/AndroidRuntime(379): Shutting down VM
04-15 11:15:05.741: D/dalvikvm(379): Debugger has detached; object registry had 1 entries
04-15 11:15:05.760: I/dalvikvm(379): JNI: AttachCurrentThread (from ???.???)
04-15 11:15:05.760: I/AndroidRuntime(379): NOTE: attach of thread 'Binder Thread #3' failed
04-15 11:15:06.220: D/AndroidRuntime(392): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
04-15 11:15:06.220: D/AndroidRuntime(392): CheckJNI is ON
04-15 11:15:06.330: D/AndroidRuntime(392): --- registering native functions ---
04-15 11:15:06.850: I/ActivityManager(59): Force stopping package com.drugindexx.demo uid=10040
04-15 11:15:06.850: I/ActivityManager(59): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.drugindexx.demo/.jsonparsngactivity }
04-15 11:15:06.960: D/AndroidRuntime(392): Shutting down VM
04-15 11:15:06.969: I/ActivityManager(59): Start proc com.drugindexx.demo for activity com.drugindexx.demo/.jsonparsngactivity: pid=398 uid=10040 gids={3003}
04-15 11:15:06.980: D/jdwp(392): Got wake-up signal, bailing out of select
04-15 11:15:06.980: D/dalvikvm(392): Debugger has detached; object registry had 1 entries
04-15 11:15:07.260: W/ActivityThread(398): Application com.drugindexx.demo is waiting for the debugger on port 8100...
04-15 11:15:07.280: I/System.out(398): Sending WAIT chunk
04-15 11:15:07.290: I/dalvikvm(398): Debugger is active
04-15 11:15:07.310: I/System.out(398): Debugger has connected
04-15 11:15:07.310: I/System.out(398): waiting for debugger to settle...
04-15 11:15:07.519: I/System.out(398): waiting for debugger to settle...
04-15 11:15:07.719: I/System.out(398): waiting for debugger to settle...
04-15 11:15:07.919: I/System.out(398): waiting for debugger to settle...
04-15 11:15:08.119: I/System.out(398): waiting for debugger to settle...
04-15 11:15:08.320: I/System.out(398): waiting for debugger to settle...
04-15 11:15:08.519: I/System.out(398): waiting for debugger to settle...
04-15 11:15:08.719: I/System.out(398): waiting for debugger to settle...
04-15 11:15:08.919: I/System.out(398): waiting for debugger to settle...
04-15 11:15:09.149: I/System.out(398): waiting for debugger to settle...
04-15 11:15:09.356: I/System.out(398): waiting for debugger to settle...
04-15 11:15:09.564: I/System.out(398): waiting for debugger to settle...
04-15 11:15:09.772: I/System.out(398): debugger has settled (1408)
04-15 11:15:13.110: W/System.err(398): java.lang.NullPointerException
04-15 11:15:13.129: W/System.err(398): at java.net.URI$Helper.parseURI(URI.java:314)
04-15 11:15:13.129: W/System.err(398): at java.net.URI$Helper.access$100(URI.java:302)
04-15 11:15:13.140: W/System.err(398): at java.net.URI.<init>(URI.java:87)
04-15 11:15:13.140: W/System.err(398): at com.drugindexx.others.JSONParser.getStringContent(JSONParser.java:37)
04-15 11:15:13.140: W/System.err(398): at com.drugindexx.demo.jsonparsngactivity$FindStoreLocators.doInBackground(jsonparsngactivity.java:237)
04-15 11:15:13.150: W/System.err(398): at com.drugindexx.demo.jsonparsngactivity$FindStoreLocators.doInBackground(jsonparsngactivity.java:1)
04-15 11:15:13.150: W/System.err(398): at android.os.AsyncTask$2.call(AsyncTask.java:185)
04-15 11:15:13.160: W/System.err(398): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-15 11:15:13.170: W/System.err(398): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-15 11:15:13.170: W/System.err(398): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
04-15 11:15:13.181: W/System.err(398): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
04-15 11:15:13.181: W/System.err(398): at java.lang.Thread.run(Thread.java:1096)
04-15 11:15:16.922: W/ActivityManager(59): Launch timeout has expired, giving up wake lock!
04-15 11:15:17.221: W/ActivityManager(59): Activity idle timeout for HistoryRecord{44eb0d10 com.drugindexx.demo/.jsonparsngactivity}
04-15 11:15:22.391: D/dalvikvm(284): GC_EXPLICIT freed 216 objects / 14432 bytes in 106ms
04-15 11:15:27.490: D/dalvikvm(295): GC_EXPLICIT freed 848 objects / 58536 bytes in 148ms
04-15 11:15:32.220: D/dalvikvm(398): threadid=7: still suspended after undo (sc=1 dc=1 s=Y)
04-15 11:15:32.500: D/SntpClient(59): request time failed: java.net.SocketException: Address family not supported by protocol
04-15 11:15:32.521: D/dalvikvm(248): GC_EXPLICIT freed 317 objects / 17472 bytes in 135ms
04-15 11:15:37.489: D/dalvikvm(134): GC_EXPLICIT freed 784 objects / 44784 bytes in 48ms
04-15 11:17:27.744: D/dalvikvm(398): threadid=7: still suspended after undo (sc=1 dc=1 s=Y)
I think what you are trying to do is to debug android sources.
And if you want to do that you need to attach the sources check out :
http://code.google.com/p/adt-addons/
But be aware: It's very unlikely that you are really needed to debug the sources, because more likely you did something wrong (Exception) BEFORE the "class not found..." Window pops up.

android: exception moving through menu

in my activities i've a bottom menu loaded using inflate (the menu is an horizontalScrollView with some buttons (one selected and one deselected for each activity)).
Moving quickly throught this menu, sometimes i get an exception (the point is random) and seems that for some reason, android has killed something so is not available for my activity.
error logs:
12-12 09:24:24.389: I/Process(480): Sending signal. PID: 480 SIG: 9
12-12 09:24:24.430: I/ActivityManager(81): Process com.apia.selfnettest (pid 480) has died.
12-12 09:24:24.439: I/WindowManager(81): WIN DEATH: Window{405b6c28 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:24.459: E/InputDispatcher(81): channel '407da4a8 com.apia.selfnettest/com.apia.selfnettest.MainClass (server)' ~ Consumer closed input channel or an error occurred. events=0x8
12-12 09:24:24.459: E/InputDispatcher(81): channel '407da4a8 com.apia.selfnettest/com.apia.selfnettest.MainClass (server)' ~ Channel is unrecoverably broken and will be disposed!
12-12 09:24:24.609: I/WindowManager(81): WIN DEATH: Window{40613eb8 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:24.769: I/WindowManager(81): WIN DEATH: Window{405fc890 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:24.960: I/WindowManager(81): WIN DEATH: Window{409d4d48 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.030: I/WindowManager(81): WIN DEATH: Window{408c5d58 com.apia.selfnettest/com.apia.selfnettest.ContactOffline paused=false}
12-12 09:24:25.189: I/WindowManager(81): WIN DEATH: Window{408f4090 com.apia.selfnettest/com.apia.selfnettest.InformationOffline paused=false}
12-12 09:24:25.289: I/WindowManager(81): WIN DEATH: Window{406f0470 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.459: I/WindowManager(81): WIN DEATH: Window{4054e0b8 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.579: I/WindowManager(81): WIN DEATH: Window{406f7be0 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.679: I/WindowManager(81): WIN DEATH: Window{409eb980 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.819: I/ActivityManager(81): Start proc com.apia.selfnettest for activity com.apia.selfnettest/.MainClass: pid=520 uid=10034 gids={3003, 1006, 1015}
12-12 09:24:25.829: I/WindowManager(81): WINDOW DIED Window{407da4a8 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.859: I/WindowManager(81): WIN DEATH: Window{40774410 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=160, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=163, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=166, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=171, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=174, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=175, events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): channel '406dfd88 com.apia.selfnettest/com.apia.selfnettest.MainClass (server)' ~ Consumer closed input channel or an error occurred. events=0x8
12-12 09:24:25.899: E/InputDispatcher(81): channel '406dfd88 com.apia.selfnettest/com.apia.selfnettest.MainClass (server)' ~ Channel is unrecoverably broken and will be disposed!
12-12 09:24:25.961: I/WindowManager(81): WIN DEATH: Window{407713a0 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:25.979: I/WindowManager(81): WIN DEATH: Window{409345c0 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.090: I/WindowManager(81): WIN DEATH: Window{408ab168 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.130: I/WindowManager(81): WIN DEATH: Window{40892f20 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.171: I/WindowManager(81): WIN DEATH: Window{406dfd88 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.199: W/WindowManager(81): Failed looking up window
12-12 09:24:26.199: W/WindowManager(81): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy#407da2c8 does not exist
12-12 09:24:26.199: W/WindowManager(81): at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:8174)
12-12 09:24:26.199: W/WindowManager(81): at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:8165)
12-12 09:24:26.199: W/WindowManager(81): at com.android.server.WindowManagerService$WindowState$DeathRecipient.binderDied(WindowManagerService.java:7024)
12-12 09:24:26.199: W/WindowManager(81): at android.os.BinderProxy.sendDeathNotice(Binder.java:381)
12-12 09:24:26.199: W/WindowManager(81): at dalvik.system.NativeStart.run(Native Method)
12-12 09:24:26.199: I/WindowManager(81): WIN DEATH: null
12-12 09:24:26.199: I/WindowManager(81): WIN DEATH: Window{4093bfb0 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.260: I/WindowManager(81): WIN DEATH: Window{408d2a28 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.300: I/WindowManager(81): WIN DEATH: Window{408a49e8 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.311: I/WindowManager(81): WIN DEATH: Window{40884570 com.apia.selfnettest/com.apia.selfnettest.MainClass paused=false}
12-12 09:24:26.319: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=181, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=184, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=187, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=190, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=195, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=196, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=198, events=0x8
12-12 09:24:26.330: E/InputDispatcher(81): Received spurious receive callback for unknown input channel. fd=202, events=0x8
12-12 09:24:26.330: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.330: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.340: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.340: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.340: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.340: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.340: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.349: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.359: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.359: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.359: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.359: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.380: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.380: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.380: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.539: I/InputDispatcher(81): Dropping event because there is no touched window or focused application.
12-12 09:24:26.630: I/jdwp(520): Ignoring second debugger -- accepting and dropping
12-12 09:24:27.030: D/AndroidRuntime(520): Shutting down VM
12-12 09:24:27.030: W/dalvikvm(520): threadid=1: thread exiting with uncaught exception (group=0x40015560)
12-12 09:24:27.050: E/AndroidRuntime(520): FATAL EXCEPTION: main
12-12 09:24:27.050: E/AndroidRuntime(520): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.apia.selfnettest/com.apia.selfnettest.MainClass}: java.lang.NullPointerException
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.os.Handler.dispatchMessage(Handler.java:99)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.os.Looper.loop(Looper.java:130)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread.main(ActivityThread.java:3683)
12-12 09:24:27.050: E/AndroidRuntime(520): at java.lang.reflect.Method.invokeNative(Native Method)
12-12 09:24:27.050: E/AndroidRuntime(520): at java.lang.reflect.Method.invoke(Method.java:507)
12-12 09:24:27.050: E/AndroidRuntime(520): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-12 09:24:27.050: E/AndroidRuntime(520): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-12 09:24:27.050: E/AndroidRuntime(520): at dalvik.system.NativeStart.main(Native Method)
12-12 09:24:27.050: E/AndroidRuntime(520): Caused by: java.lang.NullPointerException
12-12 09:24:27.050: E/AndroidRuntime(520): at com.apia.utils.LibLayout.determineScreenDensity(LibLayout.java:1273)
12-12 09:24:27.050: E/AndroidRuntime(520): at com.apia.utils.LibLayout.isXLargeLayout(LibLayout.java:1310)
12-12 09:24:27.050: E/AndroidRuntime(520): at com.apia.selfnettest.MainClass.onCreate(MainClass.java:191)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-12 09:24:27.050: E/AndroidRuntime(520): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
12-12 09:24:27.050: E/AndroidRuntime(520): ... 11 more
12-12 09:24:27.059: W/ActivityManager(81): Force finishing activity com.apia.selfnettest/.MainClass
12-12 09:24:27.580: W/ActivityManager(81): Activity pause timeout for HistoryRecord{4071c7f0 com.apia.selfnettest/.MainClass}
12-12 09:24:30.865: W/ActivityManager(81): Launch timeout has expired, giving up wake lock!
this is the function that generate the error:
public static int determineScreenDensity() {
//0: low density
//1: medium density
//2: high density
DisplayMetrics metrics = new DisplayMetrics();
((Activity) LibBanking.AppContext).getWindowManager().getDefaultDisplay().getMetrics(metrics);
int density = metrics.densityDpi;
if (density==DisplayMetrics.DENSITY_XHIGH) {
return 3;
}
else if (density==DisplayMetrics.DENSITY_HIGH) {
return 2;
}
else if (density==DisplayMetrics.DENSITY_MEDIUM) {
return 1;
}
else if (density==DisplayMetrics.DENSITY_LOW) {
return 0;
}
else {
return 1;
}
}
and notice that LibBanking.AppContext is set in each activity in this way:
LibBanking.AppContext = this;
thank you in advance....

Android NDK hellojni example fails

I'm trying to run the example from NDK package on a AT91SAM9M10-EKES board running Android 2.1
The activity fails.
This is what I get in the logcat, Can someone please guide me with this ?
D/AndroidRuntime( 1153): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 1153): CheckJNI is ON
D/AndroidRuntime( 1153): --- registering native functions ---
D/ddm-heap( 1153): Got feature list request
D/AndroidRuntime( 1153): Shutting down VM
D/dalvikvm( 1153): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 1153): DestroyJavaVM shutting VM down
D/dalvikvm( 1153): HeapWorker thread shutting down
D/dalvikvm( 1153): HeapWorker thread has shut down
D/jdwp ( 1153): JDWP shutting down net...
I/dalvikvm( 1153): Debugger has detached; object registry had 1 entries
D/dalvikvm( 1153): VM cleaning up
E/AndroidRuntime( 1153): ERROR: thread attach failed
D/dalvikvm( 1153): LinearAlloc 0x0 used 629532 of 5242880 (12%)
D/AndroidRuntime( 1161):
D/AndroidRuntime( 1161): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 1161): CheckJNI is ON
D/AndroidRuntime( 1161): --- registering native functions ---
D/ddm-heap( 1161): Got feature list request
I/ActivityManager( 767): Starting activity: Intent { act=android.intent.action.MAIN cat=android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.hellojni/.HelloJni }
D/AndroidRuntime( 1161): Shutting down VM
D/dalvikvm( 1161): DestroyJavaVM waiting for non-daemon threads to exit
D/dalvikvm( 1161): DestroyJavaVM shutting VM down
D/dalvikvm( 1161): HeapWorker thread shutting down
D/dalvikvm( 1161): HeapWorker thread has shut down
D/jdwp ( 1161): JDWP shutting down net...
I/dalvikvm( 1161): Debugger has detached; object registry had 1 entries
D/dalvikvm( 1161): VM cleaning up
E/AndroidRuntime( 1161): ERROR: thread attach failed
D/dalvikvm( 1161): LinearAlloc 0x0 used 639500 of 5242880 (12%)
I/ActivityManager( 767): Start proc com.example.hellojni for activity com.example.hellojni/.HelloJni: pid=1168 uid=10018 gids={1015}
D/ddm-heap( 1168): Got feature list request
W/dalvikvm( 1168): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcom/example/hellojni/HelloJni;.<clinit>
W/dalvikvm( 1168): Class init failed in newInstance call (Lcom/example/hellojni/HelloJni;)
D/AndroidRuntime( 1168): Shutting down VM
W/dalvikvm( 1168): threadid=3: thread exiting with uncaught exception (group=0x4001b168)
E/AndroidRuntime( 1168): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 1168): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 1168): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 1168): at java.lang.Class.newInstance(Class.java:1479)
E/AndroidRuntime( 1168): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime( 1168): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
E/AndroidRuntime( 1168): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
E/AndroidRuntime( 1168): at android.app.ActivityThread.access$2200(ActivityThread.java:119)
E/AndroidRuntime( 1168): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
E/AndroidRuntime( 1168): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1168): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1168): at android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime( 1168): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1168): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 1168): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 1168): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 1168): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1168): Caused by: java.lang.UnsatisfiedLinkError: Library hello-jni not found
E/AndroidRuntime( 1168): at java.lang.Runtime.loadLibrary(Runtime.java:489)
E/AndroidRuntime( 1168): at java.lang.System.loadLibrary(System.java:557)
E/AndroidRuntime( 1168): at com.example.hellojni.HelloJni.<clinit>(HelloJni.java:64)
E/AndroidRuntime( 1168): ... 15 more
I/Process ( 767): Sending signal. PID: 1168 SIG: 3
I/dalvikvm( 1168): threadid=7: reacting to signal 3
E/dalvikvm( 1168): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
W/ActivityManager( 767): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 767): Activity idle timeout for HistoryRecord{43d5c310 com.example.hellojni/.HelloJni}
D/dalvikvm( 813): GC freed 301 objects / 14832 bytes in 91ms
I/power ( 767): *** set_screen_state 0
E/power ( 767): Failed setting last user activity: g_error=0
W/ActivityManager( 767): Activity pause timeout for HistoryRecord{43d5c310 com.example.hellojni/.HelloJni}
D/dalvikvm( 873): GC freed 165 objects / 6624 bytes in 81ms
you hadnt built the library(.so) file of the project thats why you are getting this error, try to build the project with help of android-ndk http://developer.android.com/sdk/ndk/index.html and cygwin http://www.cygwin.com/

Embedding Google MapView crashes android app

model : zt180
firmware : android 2.1-update1-20101030
kernel : 2.6.32.9 usbandroid #1608
build number zt180-eng 2.1-update1 20101030
google maps : 4.5.1
Various crashes occur when embedding the google maps component into an android application. I'm connecting to a router via Wi-Fi for internet access. The stand-alone google maps app seems to work fine. To re-produce, start the maps app and begin scrolling around.
Will fail within a couple of minutes, occasionally on start-up (in setContentView). Most of the errors are when drawing tiles in google code. Sometimes just an Android SEGV.
NOTE : I've tested the same app on the Android developer phone 2 (os 1.6), and it works fine.
My android app is as follows:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView
android:id="#+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="043yBg1m9IiFNKXIhN5LsdeNndw2k7yrw4Ja3xQ"/>
</RelativeLayout>
import com.google.android.maps.MapActivity;
import android.os.Bundle;
public class Maps extends MapActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
protected boolean isRouteDisplayed() { return false; }
}
=========================
W/MapActivity( 2745): Recycling dispatcher com.google.googlenav.datarequest.DataRequestDispatcher#45ebcd30
V/MapActivity( 2745): Recycling map object.
I/ActivityManager( 2010): Displayed activity com.brta.android.lite/.Maps: 720 ms (total 720 ms)
I/MapActivity( 2745): Handling network change notification:CONNECTED
E/MapActivity( 2745): Couldn't get connection factory client
D/AndroidRuntime( 2745): Shutting down VM
W/dalvikvm( 2745): threadid=3: thread exiting with uncaught exception (group=0x4001b168)
E/AndroidRuntime( 2745): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 2745): java.lang.IncompatibleClassChangeError: interface not implemented
E/AndroidRuntime( 2745): at com.google.googlenav.map.Map.checkPaintTimeExceeded(Unknown Source)
E/AndroidRuntime( 2745): at com.google.googlenav.map.Map.drawMapBackground(Unknown Source)
E/AndroidRuntime( 2745): at com.google.googlenav.map.Map.drawMap(Unknown Source)
E/AndroidRuntime( 2745): at com.google.android.maps.MapView.drawMap(MapView.java:1048)
E/AndroidRuntime( 2745): at com.google.android.maps.MapView.onDraw(MapView.java:486)
<snip>
I/Process ( 2745): Sending signal. PID: 2745 SIG: 9
I/ActivityManager( 2010): Process com.brta.android.lite (pid 2745) has died.
I/WindowManager( 2010): WIN DEATH: Window{46112878 com.brta.android.lite/com.brta.android.lite.Maps paused=false}
I/UsageStats( 2010): Unexpected resume of org.adw.launcher while already resumed in com.brta.android.lite`
======================================================================
I/MapActivity( 2863): Handling network change notification:CONNECTED
E/MapActivity( 2863): Couldn't get connection factory client
D/dalvikvm( 2863): GC freed 8114 objects / 577376 bytes in 86ms
D/dalvikvm( 2863): GC freed 685 objects / 444384 bytes in 85ms
D/dalvikvm( 2863): GC freed 3458 objects / 259456 bytes in 79ms
I/ActivityManager( 2010): Displayed activity com.brta.android.lite/.Maps: 4407 ms (total 4407 ms)
D/AndroidRuntime( 2863): Shutting down VM
W/dalvikvm( 2863): threadid=3: thread exiting with uncaught exception (group=0x4001b168)
E/AndroidRuntime( 2863): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 2863): java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
E/AndroidRuntime( 2863): at java.util.Vector.elementAt(Vector.java:331)
E/AndroidRuntime( 2863): at com.google.googlenav.map.Map.drawTile(Unknown Source)
E/AndroidRuntime( 2863): at com.google.googlenav.map.Map.drawMapBackground(Unknown Source)
E/AndroidRuntime( 2863): at com.google.googlenav.map.Map.drawMap(Unknown Source)
E/AndroidRuntime( 2863): at com.google.android.maps.MapView.drawMap(MapView.java:1048)
E/AndroidRuntime( 2863): at com.google.android.maps.MapView.onDraw(MapView.java:486)
E/AndroidRuntime( 2863): at android.view.View.draw(View.java:6535)
E/AndroidRuntime( 2863): at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
E/AndroidRuntime( 2863): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
<snip>
E/AndroidRuntime( 2863): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 2010): Sending signal. PID: 2863 SIG: 3
I/dalvikvm( 2863): threadid=7: reacting to signal 3
I/dalvikvm( 2863): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 2863): Sending signal. PID: 2863 SIG: 9
I/WindowManager( 2010): WIN DEATH: Window{460ac708 com.brta.android.lite/com.brta.android.lite.Maps paused=false}
I/ActivityManager( 2010): Process com.brta.android.lite (pid 2863) has died.
I/UsageStats( 2010): Unexpected resume of org.adw.launcher while already resumed in com.brta.android.lite
W/InputManagerService( 2010): Got RemoteException sending setActive(false) notification to pid 2863 uid 10046
Basically, lots of bad things start happening...
The ZT-180 does not have Google Maps, AFAIK.

Categories

Resources