delphi xe6 打开andoridGPS设置

时间:2014-04-29 11:28:45   收藏:0   阅读:356
  Androidapi.JNI.JavaTypes, 
  Androidapi.JNI.GraphicsContentViewText,
  Androidapi.JNI.Location,
  Androidapi.JNIBridge,
  Androidapi.JNI.Os,
  Androidapi.Helpers,
  Androidapi.JNI.Provider;
.............................
procedure TForm2.Button6Click(Sender: TObject);
var
  Provider:string;
  Settings_secure:TJSettings_Secure;
  Intent:JIntent;
begin
  Provider:=JStringToString(Settings_secure.JavaClass.getString(
  SharedActivityContext.getContentResolver,
  TJSettings_system.javaClass.LOCATION_PROVIDERS_ALLOWED));
// if pos(‘gps‘,provider)=0 then
// begin
    Intent:=TJIntent.Create;
    Intent.setAction(TJSettings.javaClass.ACTION_LOCATION_SOURCE_SETTINGS);
    SharedActivity.startActivity(Intent);
// end;
end;

delphi xe6 打开andoridGPS设置,码迷,mamicode.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!