adrnsoh / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

NullPointerException with LocationManager on Android devices #102

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.call LocationManager.getInstance().getCurrentLocation()
2. deploy to physical android device

What is the expected output? What do you see instead?
NullPointerException dialog appears.  Tested same code on the simulator and a 
J2ME device and neither threw the exception.

What version of the product are you using? On what operating system?
build 20120315 on Android ICS (Galaxy Nexus)

Original issue reported on code.google.com by 1815...@coolman.ca on 16 Mar 2012 at 4:06

GoogleCodeExporter commented 9 years ago
I know Chen tested this on Android so I'm guessing he will need code to 
reproduce this.

Original comment by shai.almog on 16 Mar 2012 at 4:38

GoogleCodeExporter commented 9 years ago
Attached is the java. My apologies on the title of this bug, the null pointer 
is mine, I acted on the Location object without testing if it's null.  The 
javadoc states it returns location or throws IOException if can't get location. 
 On my galaxy nexus, I get null returned no matter what location settings I 
have set on my phone. 

Original comment by 1815...@coolman.ca on 16 Mar 2012 at 5:57

Attachments:

GoogleCodeExporter commented 9 years ago
thanks

Original comment by cf27...@gmail.com on 16 Mar 2012 at 11:12