Skip to content

Commit

Permalink
Release 1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
robo-w authored Feb 17, 2022
2 parents eac62bb + 1b333ec commit 1e3dfd2
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 59 deletions.
19 changes: 14 additions & 5 deletions GeoClient/GeoClient.Android/GeoClient.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
Expand Down Expand Up @@ -63,25 +63,34 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Plugin.Permissions">
<Version>3.0.0.12</Version>
<Version>6.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Android.Support.Compat">
<Version>28.0.0.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.Android.Support.Vector.Drawable">
<Version>28.0.0.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.AppCompat.Resources">
<Version>1.1.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.MediaRouter">
<Version>1.2.5.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Palette">
<Version>1.0.0.10</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.4.0</Version>
<Version>1.7.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991640" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2337" />
<PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.3" />
<PackageReference Include="Xamarin.GooglePlayServices.Location">
<Version>71.1600.0</Version>
<Version>118.0.0.3</Version>
</PackageReference>
<PackageReference Include="ZXing.Net.Mobile">
<Version>2.4.1</Version>
Expand Down
41 changes: 11 additions & 30 deletions GeoClient/GeoClient.Android/Location/GooglePlayLocationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace GeoClient.Droid.Location
{
public class GooglePlayLocationProvider : Java.Lang.Object, ILocationListener, ILocationProvider, GoogleApiClient.IConnectionCallbacks, GoogleApiClient.IOnConnectionFailedListener
public class GooglePlayLocationProvider : LocationCallback, ILocationProvider
{
private const string LoggerTag = "GooglePlayLocationProvider";

Expand All @@ -16,15 +16,11 @@ public class GooglePlayLocationProvider : Java.Lang.Object, ILocationListener, I
Log.Warn(LoggerTag, "No location update delegate registered!");
};

private readonly GoogleApiClient _googleApiClient;
private readonly FusedLocationProviderClient _fusedLocationClient;

public GooglePlayLocationProvider()
{
_googleApiClient = new GoogleApiClient.Builder(Application.Context)
.AddApi(LocationServices.API)
.AddConnectionCallbacks(this)
.AddOnConnectionFailedListener(this)
.Build();
_fusedLocationClient = LocationServices.GetFusedLocationProviderClient(Application.Context);
}

public void RegisterLocationUpdateDelegate(LocationProviderListener updateDelegate)
Expand All @@ -34,43 +30,28 @@ public void RegisterLocationUpdateDelegate(LocationProviderListener updateDelega

public void StartLocationProvider()
{
_googleApiClient.Connect();
}

public void StopLocationProvider()
{
_googleApiClient.Disconnect();
}

public void OnConnected(Bundle connectionHint)
{
var locationRequest = new LocationRequest()
var locationRequest = LocationRequest.Create()
.SetPriority(LocationRequest.PriorityHighAccuracy)
.SetInterval(10000)
.SetInterval(15000)
.SetFastestInterval(5000);
LocationServices.FusedLocationApi.RequestLocationUpdates(_googleApiClient, locationRequest, this);
_fusedLocationClient.RequestLocationUpdates(locationRequest, this, Looper.MainLooper);
}

public void OnConnectionSuspended(int cause)
{
Log.Warn(LoggerTag, "Connection of google API client has been suspended!");
}

public void OnConnectionFailed(ConnectionResult result)
public void StopLocationProvider()
{
Log.Warn(LoggerTag, "Connection to google API client failed!");
_fusedLocationClient.RemoveLocationUpdates(this);
}

public void OnLocationChanged(Android.Locations.Location location)
public override void OnLocationResult(LocationResult location)
{
if (location != null)
{
var updatedLocation = XamarinLocationFactory.CreateXamarinLocation(location);
var updatedLocation = XamarinLocationFactory.CreateXamarinLocation(location.LastLocation);
_updateDelegate.Invoke(updatedLocation);
}
else
{
Log.Debug(LoggerTag, "Received empty location update from google play provider!");
Log.Debug(LoggerTag, "Received empty location update from Google Play provider!");
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions GeoClient/GeoClient.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="90" android:versionName="1.2.2" package="at.wrk.fmd.cocemocl" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="95" android:versionName="1.2.3" package="at.wrk.fmd.cocemocl" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
Expand Down
6 changes: 3 additions & 3 deletions GeoClient/GeoClient.UWP/GeoClient.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@
<Version>4.5.0.6</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.4.0</Version>
<Version>1.7.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991640" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.9" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2337" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.13" />
<PackageReference Include="ZXing.Net.Mobile">
<Version>2.4.1</Version>
</PackageReference>
Expand Down
6 changes: 3 additions & 3 deletions GeoClient/GeoClient.iOS/GeoClient.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Essentials">
<Version>1.4.0</Version>
<Version>1.7.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991640" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2337" />
<PackageReference Include="ZXing.Net.Mobile">
<Version>2.4.1</Version>
</PackageReference>
Expand Down Expand Up @@ -207,7 +207,7 @@
</ItemGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties XamarinHotReloadWrongLinkerErrorInfoBarGeoClientiOSHideInfoBar="True" XamarinHotReloadXFormsNugetUpgradeInfoBarGeoClientiOSHideInfoBar="True" />
<UserProperties XamarinHotReloadXFormsNugetUpgradeInfoBarGeoClientiOSHideInfoBar="True" XamarinHotReloadWrongLinkerErrorInfoBarGeoClientiOSHideInfoBar="True" />
</VisualStudio>
</ProjectExtensions>
</Project>
4 changes: 2 additions & 2 deletions GeoClient/GeoClient.iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<key>CFBundleIdentifier</key>
<string>at.wrk.fmd.cocemocl.geoclient</string>
<key>CFBundleVersion</key>
<string>1.2.2</string>
<string>1.2.3</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleName</key>
Expand All @@ -48,7 +48,7 @@
<key>NSLocationWhenInUseUsageDescription</key>
<string>GeoClient needs access to the location data in the background to send correct location data</string>
<key>CFBundleShortVersionString</key>
<string>1.2.2</string>
<string>1.2.3</string>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
Expand Down
2 changes: 1 addition & 1 deletion GeoClient/GeoClient.iOS/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, "AppDelegate");
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
}
4 changes: 2 additions & 2 deletions GeoClient/GeoClient.iOS/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.2.0")]
[assembly: AssemblyFileVersion("1.2.2.0")]
[assembly: AssemblyVersion("1.2.3.0")]
[assembly: AssemblyFileVersion("1.2.3.0")]
12 changes: 6 additions & 6 deletions GeoClient/GeoClient/GeoClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<Authors>Daniel Steiner, Robert Wittek</Authors>
<Copyright>MIT License</Copyright>
<Description>App to share the position data</Description>
<Version>1.2.2</Version>
<AssemblyVersion>1.2.2.0</AssemblyVersion>
<FileVersion>1.2.2.0</FileVersion>
<Version>1.2.3</Version>
<AssemblyVersion>1.2.3.0</AssemblyVersion>
<FileVersion>1.2.3.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -18,9 +18,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Xamarin.Essentials" Version="1.4.0" />
<PackageReference Include="Xamarin.Forms" Version="4.4.0.991640" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.1" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2337" />
<PackageReference Include="ZXing.Net.Mobile" Version="2.4.1" />
<PackageReference Include="ZXing.Net.Mobile.Forms" Version="2.4.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion GeoClient/GeoClient/Views/AboutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
FontAttributes="Bold"
FontSize="Large" />
<Span
Text="1.2.2"
Text="1.2.3"
FontSize="Large"
ForegroundColor="{StaticResource LightTextColor}" />
</FormattedString.Spans>
Expand Down
8 changes: 4 additions & 4 deletions GeoClientTests/GeoClientTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
<Version>13.0.1</Version>
</PackageReference>
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="Xamarin.UITest" Version="3.0.5" />
<PackageReference Include="NUnitTestAdapter" Version="2.2.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="Xamarin.UITest" Version="3.2.6" />
<PackageReference Include="NUnitTestAdapter" Version="2.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GeoClient\GeoClient\GeoClient.csproj">
Expand Down

0 comments on commit 1e3dfd2

Please sign in to comment.