Credits go to Felix Ventero from RadarDroid

      *if* (lm.isProviderEnabled(LocationManager.GPS_PROVIDER)) {

            *if* (settings.getBoolean("use_other_gps_starter", *false*)) {

                // use brute force GPS starter for Galaxy Spica

                mLocationListener = *this*;

                *new* Thread() {

                    @Override

                    *public* *void* run() {

                        Looper.prepare();

                        locationThreadLooper = Looper.myLooper();

                        // Log.v(TAG, "Requesting alternative location 
updates");

                        lm.addGpsStatusListener(onGpsStatusChange);

                        lm.requestLocationUpdates(LocationManager.
GPS_PROVIDER, 0, 0, mLocationListener, locationThreadLooper);

                        Looper.loop();

                    }

                }.start();

            } *else* {

                // normal GPS start

                lm.addGpsStatusListener(onGpsStatusChange);

                lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 
0, *this*);

            }

        }

On Wednesday, March 20, 2013 6:54:57 PM UTC-4, lbendlin wrote:
>
> I am currently traveling with no access to the code. I also need to make 
> sure I get the attribution right as the hack was developed by someone else.
>  
> As for the why - my guess it is a botched attempt by Samsung to mess with 
> the GPS radio power management.
>
> On Wednesday, March 20, 2013 10:42:18 AM UTC-5, Kristopher Micinski wrote:
>
>> I'm interested as to why their implementation would differ from the 
>> standard API, do you have any specific reason for not putting an 
>> example on github, or would you care to share the trick..? 
>>
>> (I'm just interested because it seems like a stupid decision on the 
>> vendor's part to break things..) 
>>
>> Kris 
>>
>>
>> On Wed, Mar 20, 2013 at 11:09 AM, lbendlin <lu...@bendlin.us> wrote: 
>> > Some Galaxy devices (especially the Spica) require an alternative way 
>> of starting up the location listener. Ping me if you want the code. 
>> > 
>> > -- 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> > Groups "Android Developers" group. 
>> > To post to this group, send email to android-d...@googlegroups.com 
>> > To unsubscribe from this group, send email to 
>> > android-developers+unsubscr...@googlegroups.com 
>> > For more options, visit this group at 
>> > http://groups.google.com/group/android-developers?hl=en 
>> > --- 
>> > You received this message because you are subscribed to the Google 
>> Groups "Android Developers" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to android-developers+unsubscr...@googlegroups.com. 
>> > For more options, visit https://groups.google.com/groups/opt_out. 
>> > 
>> > 
>>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to