• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Bugfixing: need developer with Galaxy

Hi piotr,
It might be worth contacting the author of the post to see if they had any luck with the issue.
Donster

Funny :) This is my post there :D I'm still searching for problem resolution. I think, it would be easier, if I could just buy an Galaxy :) But unfortunately, it is impossible, so I need help of some Galaxy owner.

I really do not know, what is wrong with this code.

Attachment added for any ppl interested.
 

Attachments

  • TestGPS.zip
    37 KB · Views: 98
Upvote 0
I'm a J2EE developer, I'll be happy to help.
I just need to setup my environment.

Great !

You can get TestGPS.zip from my previous post, unpack and open project in Eclipse (Installing the Android SDK | Android Developers).

APK is inside zip file.

This is very simple project, that does nothing but logs GPS activity to edit window.

On my Magic, log looks like that:

onCreate
Location providers:
- network
- gps
Started
GPS_EVENT_FIRST_FIX
loc: alt, accuracy / 768.0
loc: alt, accuracy / 192.0
loc: alt, accuracy / 128.0
loc: alt, accuracy / 96.0
Accuracy acceptable

If you do not get results as above (or similar), you can browse code, for methods, that are never called. Why they are not ? I do not know :)
 
Upvote 0
I can't seem to get the adb to list my galaxy...

You have to change a bit the <SDK-folder>\usb_driver\android_usb.inf

[Google.NTx86]
...
; Samsung Galaxy
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6640
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6640&MI_04
%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_0FFF

[Google.NTamd64]
...
; Samsung Galaxy
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6640
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6640&MI_04
%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_0FFF
 
Upvote 0
Running the apk from phone:
onCreate
Location providers:
- gps
- network
Started
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
TEMPORARILY_UNAVAILABLE
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED

When I get back home from work, I'll try the suggested fix for the drivers (Thanks dgtale!) And debug it on my IntelliJ
 
Upvote 0
You have to change a bit the <SDK-folder>\usb_driver\android_usb.inf

[Google.NTx86]
...
; Samsung Galaxy
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6640
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6640&MI_04
%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_0FFF

[Google.NTamd64]
...
; Samsung Galaxy
%SingleAdbInterface% = USB_Install, USB\VID_04E8&PID_6640
%CompositeAdbInterface% = USB_Install, USB\VID_04E8&PID_6640&MI_04
%SingleBootLoaderInterface% = USB_Install, USB\VID_04E8&PID_0FFF

added the files and selected the %SingleAdbInterface% but I get an error while installing the driver:
"The driver installation file for this device is missing an entry..."
 
Upvote 0
I don't get it. Did you just run TestGPS.apk without any changes ?

I got this initially when indoors

onCreate
Location providers:
- gps
- network
Started
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
TEMPORARILY_UNAVAILABLE
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
.
.
.

assumed it was due to no GPS signal so I hung out the window at got what you expected.

onCreate
Location providers:
- gps
- network
Started
GPS_EVENT_STARTED
GPS_EVENT_FIRST_FIX
loc: alt, accuracy / 35.74532
Accuracy acceptable

Didn't change any source

After some more tests, it seems like it only works as expected if the phione has a GPS signal lock prior to starting the app, or switching back to the app from another (when the onStart() event runs).


I then did this

onCreate <- Started app with no GPS lock
Location providers:
- gps
- network
Started
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
TEMPORARILY_UNAVAILABLE
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED <- walked outside at this point
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED <- opened google maps at this point and let it located me
TEMPORARILY_UNAVAILABLE
Started <- swapped back to TestGPS
GPS_EVENT_STARTED
TEMPORARILY_UNAVAILABLE.
GPS_EVENT_FIRST_FIX
loc: alt, accuracy / 35.74532
Accuracy acceptable
AVAILABLE <- walked back inside
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
TEMPORARILY_UNAVAILABLE
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
.
.
.
 
Upvote 0
I got this initially when indoors

onCreate
Location providers:
- gps
- network
Started
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
TEMPORARILY_UNAVAILABLE
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
.
.
.

assumed it was due to no GPS signal so I hung out the window at got what you expected.

onCreate
Location providers:
- gps
- network
Started
GPS_EVENT_STARTED
GPS_EVENT_FIRST_FIX
loc: alt, accuracy / 35.74532
Accuracy acceptable

Didn't change any source

After some more tests, it seems like it only works as expected if the phione has a GPS signal lock prior to starting the app, or switching back to the app from another (when the onStart() event runs).


I then did this

onCreate <- Started app with no GPS lock
Location providers:
- gps
- network
Started
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
TEMPORARILY_UNAVAILABLE
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED <- walked outside at this point
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED <- opened google maps at this point and let it located me
TEMPORARILY_UNAVAILABLE
Started <- swapped back to TestGPS
GPS_EVENT_STARTED
TEMPORARILY_UNAVAILABLE.
GPS_EVENT_FIRST_FIX
loc: alt, accuracy / 35.74532
Accuracy acceptable
AVAILABLE <- walked back inside
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
TEMPORARILY_UNAVAILABLE
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
.
.
.

Reproduced it as well.
It took more time to lock on me, even after google maps locked on me, but It worked.
 
Upvote 0
Hi.

It's the same here. However, reducing the polling interval (ie. calling the start(int) method with parameter between 0 and 5) results in locking the GPS signal quite quick.

This is with start(3), in pretty poor conditions (indoors)

Code:
onCreate
Location providers:
- gps
- network
Started
GPS_EVENT_STOPPED
GPS_EVENT_STARTED
TEMPORARILY_UNAVAILABLE.....
GPS_EVENT_FIRST_FIX
loc: alt, accuracy / 214.66252
AVAILABLE
loc: alt, accuracy / 80.0
Accuracy acceptable
With 10, it's terrible. It's turning GPS off for too long to get some usable lock, even - as others demonstrated - when the lock was already made by some external application. After switching back to your app, it just shuts it down again.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones