Thank you very much!

I finally managed to solve the problem today =)
Actually what was wrong was my code but now its solved... I managed to
find out the problem by walking outdoor with the laptop on and the
debugger attached to the mobile device xD
It was kinda funny :)

Thanks again!

On 8 nov, 00:52, "Maps.Huge.Info (Maps API Guru)" <[email protected]>
wrote:
> You could check the list of satellites available, if none are visible,
> I'm guessing that would mean you have lost the signal.
>
> Here's some code that may help:
>
>         private TextView locGpsStatus = null ;
>         private Integer iGpsStatus = -1 ;
>
> .
> .
> .
>
>         // Listener forGPSStatus...
>
>         private final Listener onGpsStatusChange=new GpsStatus.Listener()
>         {
>                 public void onGpsStatusChanged(int event)
>                 {
>                         if ( DOLOG ) Log.v("TEST","LocationActivity - 
> onGpsStatusChange:
> onGpsStatusChanged: " + Integer.toString(event)) ;
>
>                         switch( event )
>                         {
>                         case GpsStatus.GPS_EVENT_STARTED:
>                                 locGpsStatus.setText("Started...") ;
>                                 iGpsStatus = event ;
>                                 break ;
>                         case GpsStatus.GPS_EVENT_SATELLITE_STATUS:
>                                 GpsStatus xGpsStatus = 
> locMgr.getGpsStatus(null) ;
>                                 Iterable<GpsSatellite> iSatellites = 
> xGpsStatus.getSatellites() ;
>                                 Iterator<GpsSatellite> it = 
> iSatellites.iterator() ;
>                                 iSats = 0 ;                                   
>   // Satellite Count
>                                 while ( it.hasNext() )
>                                 {
>                                         iSats++ ;
>                                         it.next() ;
>                                         GpsSatellite oSat = (GpsSatellite) 
> it.next() ;
>                                         if ( DOLOG ) 
> Log.v("TEST","LocationActivity - onGpsStatusChange:
> Satellites: " + oSat.getSnr() ) ;
>                                 }
>                                 if ( DOLOG ) Log.v("TEST","LocationActivity - 
> onGpsStatusChange:
> Satellites: " + iSats ) ;
>
>                                 break ;
>                         case GpsStatus.GPS_EVENT_FIRST_FIX:
>                                 locGpsStatus.setText("First Fix...") ;
>                                 iGpsStatus = event ;
>                                 break ;
>                         case GpsStatus.GPS_EVENT_STOPPED:
>                                 locGpsStatus.setText("Stopped...") ;
>                                 iGpsStatus = event ;
>                                 break ;
>                         }
>                 }
>         } ;
>
> -John Coryat
>
> "Radar Now!"
>
> "What Zip Code?"

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to