代码上如何实现打开gps定位,要求兼容版本4.0以下
    public static final void openGPS(Context context) {  
    
    
        Intent GPSIntent = new Intent();  
        GPSIntent.setClassName("com.android.settings",  
                "com.android.settings.widget.SettingsAppWidgetProvider");  
        GPSIntent.addCategory("android.intent.category.ALTERNATIVE");  
        GPSIntent.setData(Uri.parse("custom:3"));  
        try {  
            PendingIntent.getBroadcast(context, 0, GPSIntent, 0).send();  
        } catch (CanceledException e) {  
            e.printStackTrace();  
        }  
    }
网上找了下,但是好像没作用,我用的是android2.3测试的
谢谢各位大侠~~~