@capgo/nativegeocoder 8.0.4 → 8.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,7 +5,6 @@ import android.location.Address;
|
|
|
5
5
|
import android.location.Geocoder;
|
|
6
6
|
import android.net.ConnectivityManager;
|
|
7
7
|
import android.net.NetworkInfo;
|
|
8
|
-
import android.os.Build;
|
|
9
8
|
import com.getcapacitor.JSObject;
|
|
10
9
|
import com.getcapacitor.PluginCall;
|
|
11
10
|
import java.util.List;
|
|
@@ -216,15 +215,7 @@ public class NativeGeocoder {
|
|
|
216
215
|
*/
|
|
217
216
|
private Geocoder createGeocoderWithOptions(NativeGeocoderOptions geocoderOptions) {
|
|
218
217
|
if (geocoderOptions.defaultLocale != null && !geocoderOptions.defaultLocale.isEmpty()) {
|
|
219
|
-
Locale locale;
|
|
220
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
|
221
|
-
locale = Locale.forLanguageTag(geocoderOptions.defaultLocale);
|
|
222
|
-
} else {
|
|
223
|
-
String[] parts = geocoderOptions.defaultLocale.split("[-_]", -1);
|
|
224
|
-
if (parts.length == 1) locale = new Locale(parts[0]);
|
|
225
|
-
else if (parts.length == 2 || (parts.length == 3 && parts[2].startsWith("#"))) locale = new Locale(parts[0], parts[1]);
|
|
226
|
-
else locale = new Locale(parts[0], parts[1], parts[2]);
|
|
227
|
-
}
|
|
218
|
+
Locale locale = Locale.forLanguageTag(geocoderOptions.defaultLocale);
|
|
228
219
|
geocoder = new Geocoder(context.getApplicationContext(), locale);
|
|
229
220
|
} else {
|
|
230
221
|
if (geocoderOptions.useLocale) {
|
|
@@ -9,7 +9,7 @@ import com.getcapacitor.annotation.CapacitorPlugin;
|
|
|
9
9
|
@CapacitorPlugin(name = "NativeGeocoder")
|
|
10
10
|
public class NativeGeocoderPlugin extends Plugin {
|
|
11
11
|
|
|
12
|
-
private final String pluginVersion = "8.0.
|
|
12
|
+
private final String pluginVersion = "8.0.6";
|
|
13
13
|
|
|
14
14
|
private NativeGeocoder implementation = new NativeGeocoder();
|
|
15
15
|
|
|
@@ -7,7 +7,7 @@ import Capacitor
|
|
|
7
7
|
*/
|
|
8
8
|
@objc(NativeGeocoderPlugin)
|
|
9
9
|
public class NativeGeocoderPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
10
|
-
private let pluginVersion: String = "8.0.
|
|
10
|
+
private let pluginVersion: String = "8.0.6"
|
|
11
11
|
public let identifier = "NativeGeocoderPlugin"
|
|
12
12
|
public let jsName = "NativeGeocoder"
|
|
13
13
|
public let pluginMethods: [CAPPluginMethod] = [
|