Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions android/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin"/>
</classpath>
23 changes: 23 additions & 0 deletions android/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>settings</name>
<comment>Project settings created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=../../../projects/flutter/deepblue/android
eclipse.preferences.version=1
8 changes: 8 additions & 0 deletions android/src/main/java/com/ly/settings/SettingsPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public void onMethodCall(MethodCall call, Result result) {
openWiFiSettings();
result.success(true);
break;
case "gps":
openGPSSettings();
result.success(true);
break;
default:
result.notImplemented();
break;
Expand All @@ -38,4 +42,8 @@ private void openWiFiSettings() {
registrar.activity().startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));
}

private void openGPSSettings() {
registrar.activity().startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
}

}
4 changes: 4 additions & 0 deletions lib/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ class Settings {
static Future<bool> openWiFiSettings() async {
return await _channel.invokeMethod('wifi');
}

static Future<bool> openGPSSettings() async {
return await _channel.invokeMethod('gps');
}
}