RoosterRat / a2dpvolume

Automatically exported from code.google.com/p/a2dpvolume
1 stars 1 forks source link

Auto GPS enable does not work on Android 4.0 and up. #110

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Device (phone) brand: Samsung
Device (phone) model: Galaxy Nexus
Android OS version: 4.0.4
GPS will not auto enable on ICS devices.

Original issue reported on code.google.com by JimR...@gmail.com on 30 Apr 2012 at 10:00

GoogleCodeExporter commented 9 years ago
See this: 
http://stackoverflow.com/questions/10302894/ics-android-enable-gps-programmatica
lly-closed-using-an-alternative-approach

Looks like they purposely removed this feature in ICS.  

Original comment by JimR...@gmail.com on 30 Apr 2012 at 11:06

GoogleCodeExporter commented 9 years ago
Here is the "fix"

        // if Android is ICS or higher, disable this feature
        if (android.os.Build.VERSION.SDK_INT >= 11){
            fenableGPS.setChecked(false);
            fenableGPS.setVisibility(CheckBox.GONE);

        }

This will remove the option for ICS and up.  This will no longer show up in the 
edit device screen if you have API 11 or higher.  Sorry folks.

Original comment by JimR...@gmail.com on 1 May 2012 at 12:14

GoogleCodeExporter commented 9 years ago
I'm sorry, i can't understand your code.
What's "fenableGPS" ?
and where's the code combined ?
Thank you! 

Original comment by nguyenth...@gmail.com on 21 Jul 2012 at 4:37

GoogleCodeExporter commented 9 years ago
The point is that Android purposely removed the ability for apps to auto-enable 
GPS.  When they did this I implemented an Android version check to disable the 
feature.  Basically it is gone forever and I cannot make it work in Android 4.0 
and up.

Original comment by JimR...@gmail.com on 21 Jul 2012 at 11:20