Skip to content

Commit

Permalink
Merge pull request #54 from wrk-fmd/develop
Browse files Browse the repository at this point in the history
Release v1.2.1
  • Loading branch information
robo-w authored Feb 23, 2020
2 parents cf773de + 75bd942 commit e7996ff
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 80 deletions.
6 changes: 4 additions & 2 deletions GeoClient/GeoClient.Android/GeoClient.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
<DefineConstants>
</DefineConstants>
<MandroidI18n />
<AndroidUseAapt2>false</AndroidUseAapt2>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidDexTool>d8</AndroidDexTool>
<AndroidPackageFormat>aab</AndroidPackageFormat>
<AndroidCreatePackagePerAbi>false</AndroidCreatePackagePerAbi>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
Expand Down Expand Up @@ -79,7 +81,7 @@
<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>29.0.0.2</Version>
<Version>71.1600.0</Version>
</PackageReference>
<PackageReference Include="ZXing.Net.Mobile">
<Version>2.4.1</Version>
Expand Down
2 changes: 1 addition & 1 deletion GeoClient/GeoClient.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompa
private static readonly int RequestLocationPermissionCode = 1000;
private static readonly string[] RequiredLocationPermissions = { Manifest.Permission.AccessFineLocation };

private static readonly int RequestCameraPermissionCode = 0;
private static readonly int RequestCameraPermissionCode = 1001;
private static readonly string[] RequiredCameraPermissions = { Manifest.Permission.Camera };

private static readonly long CleanupTimeoutInMilliseconds = 24 * 60 * 60 * 1000;
Expand Down
4 changes: 3 additions & 1 deletion GeoClient/GeoClient.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="80" android:versionName="1.2.0" package="at.wrk.fmd.cocemocl" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="85" android:versionName="1.2.1" package="at.wrk.fmd.cocemocl" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29" />
<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" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application android:label="GeoClient.Android" android:icon="@mipmap/icon"></application>
</manifest>
3 changes: 2 additions & 1 deletion GeoClient/GeoClient.iOS/GeoClient.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<MtouchArch>ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchExtraArgs>--optimize=experimental-xforms-product-type</MtouchExtraArgs>
</PropertyGroup>
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
<AppExtensionDebugBundleId />
Expand Down Expand Up @@ -206,7 +207,7 @@
</ItemGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties XamarinHotReloadXFormsNugetUpgradeInfoBarGeoClientiOSHideInfoBar="True" XamarinHotReloadWrongLinkerErrorInfoBarGeoClientiOSHideInfoBar="True" />
<UserProperties XamarinHotReloadWrongLinkerErrorInfoBarGeoClientiOSHideInfoBar="True" XamarinHotReloadXFormsNugetUpgradeInfoBarGeoClientiOSHideInfoBar="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.0</string>
<string>1.2.1</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.0</string>
<string>1.2.1</string>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
Expand Down
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.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyVersion("1.2.1.0")]
[assembly: AssemblyFileVersion("1.2.1.0")]
6 changes: 3 additions & 3 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.0</Version>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<FileVersion>1.2.0.0</FileVersion>
<Version>1.2.1</Version>
<AssemblyVersion>1.2.1.0</AssemblyVersion>
<FileVersion>1.2.1.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
64 changes: 0 additions & 64 deletions GeoClient/GeoClient/Services/Location/LocationService.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ private void SetRegisteredUnitInformation(UnitInformation value)

private void ParseRegistrationInfoFromUrl(string url)
{
_registeredUnitInformation = null;
var wasRegisteredBefore = IsRegistered();
_cachedRegistrationInfo = RegistrationInfoParser.ParseRegistrationInfo(url);
var isRegisteredAfterUpdate = IsRegistered();
Expand Down
12 changes: 12 additions & 0 deletions GeoClient/GeoClient/ViewModels/ItemDetailViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ public class ItemDetailViewModel : BaseViewModel

public Color OpenLocationButtonColor => GetOpenLocationButtonColor();
public string OpenLocationButtonText => GetOpenLocationButtonText();
public bool IsOpenLocationButtonApplicable => IsOpenLocationApplicable();

public Color OpenDestinationButtonColor => GetOpenDestinationButtonColor();
public string OpenDestinationButtonText => GetOpenDestinationButtonText();

public Color SetNextStateButtonColor => GetSetNextStateButtonColor();
public string SetNextStateButtonText => GetSetNextStateButtonText();
public bool IsNextStateButtonVisible => IsNextStateActionApplicable();

public ItemDetailViewModel(IncidentItem incidentItem = null)
{
Expand All @@ -40,6 +42,11 @@ private bool IsLocationAvailable()
return IncidentItem?.Location != null;
}

private bool IsOpenLocationApplicable()
{
return IncidentItem?.Type != GeoIncidentType.Relocation;
}

private Color GetOpenDestinationButtonColor()
{
return IsDestinationAvailable() ? ActiveButtonColor : DisableButtonColor;
Expand All @@ -65,6 +72,11 @@ private string GetSetNextStateButtonText()
return IsNextStateActionAvailable() ? GenerateNextStateButtonText() : "Statusänderung nicht möglich";
}

private bool IsNextStateActionApplicable()
{
return IncidentItem?.IsUnitAssignedToTask ?? false;
}

private string GenerateNextStateButtonText()
{
var plannedState = IncidentItem.NextStateAction.PlannedState;
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.0"
Text="1.2.1"
FontSize="Large"
ForegroundColor="{StaticResource LightTextColor}" />
</FormattedString.Spans>
Expand Down
9 changes: 7 additions & 2 deletions GeoClient/GeoClient/Views/AboutPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using GeoClient.Services.Location;
using GeoClient.Services.Boundary;
using GeoClient.Services.Location;
using GeoClient.Services.Registration;
using System;
using System.Collections.Generic;
Expand All @@ -19,10 +20,12 @@ public partial class AboutPage : ContentPage, ILocationUpdateListener
private static readonly CultureInfo GermanCultureInfo = new CultureInfo("de-DE");

private readonly RegistrationService _registrationService;
private readonly RestService _restService;

public AboutPage()
{
_registrationService = RegistrationService.Instance;
_restService = RestService.Instance;
InitializeComponent();
}

Expand Down Expand Up @@ -109,11 +112,13 @@ private async Task UpdateRegistrationInformation(bool unregisteredOnPurpose)
{
if (_registrationService.IsRegistered())
{
DisplayRegistrationInfo();
// Try to load scope the first time here to show the unit name afterwards.
_restService.GetScope();
await DisplayAlert(
"Registrierung erfolgreich",
"Dieses Gerät ist nun erfolgreich registriert und sendet den Standort.",
"OK");
DisplayRegistrationInfo();
}
else if (unregisteredOnPurpose)
{
Expand Down
5 changes: 4 additions & 1 deletion GeoClient/GeoClient/Views/ItemDetailPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
Source="{Binding IncidentItem.OwnTaskStateIcon}" />
</StackLayout>

<Grid Margin="0,10">
<Grid
Margin="0,10"
IsVisible="{Binding IsNextStateButtonVisible}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
Expand Down Expand Up @@ -82,6 +84,7 @@
<Button
x:Name="OpenLocationButton"
Text="{Binding OpenLocationButtonText}"
IsVisible="{Binding IsOpenLocationButtonApplicable}"
Clicked="OpenLocation_Clicked"
BackgroundColor="{Binding OpenLocationButtonColor}"
TextColor="White"
Expand Down

0 comments on commit e7996ff

Please sign in to comment.