Version 3.0.255

This commit is contained in:
Oliver Hauff 2021-11-07 19:42:59 +01:00
parent db9c288584
commit 5a26bf273b
1495 changed files with 159465 additions and 5060 deletions

View file

@ -4,6 +4,7 @@ using Android.Content.PM;
using Android.OS;
using Android.Content;
using Java.Interop;
using Plugin.Permissions;
namespace TINK.Droid
{
@ -19,6 +20,9 @@ namespace TINK.Droid
global::Xamarin.Forms.Forms.Init (this, bundle);
// Initialize xamarin.essentials, see https://docs.microsoft.com/en-us/xamarin/essentials/get-started?tabs=macos%2Candroid.
Xamarin.Essentials.Platform.Init(this, bundle);
// Required for initialization of Maps, see https://developer.xamarin.com/guides/xamarin-forms/user-interface/map/
Xamarin.FormsGoogleMaps.Init(this, bundle);
@ -39,6 +43,25 @@ namespace TINK.Droid
LoadApplication(new App());
}
/// <summary>
/// Handles opening the dialog to request for permissions.
/// </summary>
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Android.Content.PM.Permission[] grantResults)
{
if (App.PermissionsService.GetType() == typeof(TINK.Services.Permissions.Essentials.Permissions))
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
else if (App.PermissionsService.GetType() == typeof(TINK.Services.Permissions.Plugin.Permissions))
{
// Bug in 3.0.244 and earlier versions of sharee.bike app: Call of PermissionsImplementation.Current.OnRequestedPermission result was missing.
// see https://dev.azure.com/TeilRad/sharee.bike%20Buchungsplattform/_workitems/edit/136 for further details.
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
[Export("TapStation")]
public void TapStation(string stationNr)
{

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.hauffware.sharee" android:versionName="3.0.244" android:versionCode="244">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="30" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.hauffware.sharee" android:versionName="3.0.255" android:versionCode="255">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="29" />
<!-- Google Maps related permissions -->
<permission android:name="com.ecs.google.maps.v2.actionbarsherlock.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
<!-- Network connectivity permissions -->
@ -16,5 +16,5 @@
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
<application android:icon="@drawable/sharee" android:label="sharee.bike" android:allowBackup="false"></application>
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="000000000-000000000000000000000000000-0" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="000000000000000000000000000000000000000" />
</manifest>

View file

@ -40,6 +40,6 @@ using Xamarin.Forms;
[assembly: Application(Debuggable = false)]
#endif
[assembly: MetaData("com.google.android.maps.v2.API_KEY", Value = "000000000-000000000000000000000000000-0")]
[assembly: MetaData("com.google.android.maps.v2.API_KEY", Value = "000000000000000000000000000000000000000")]
[assembly: ExportFont("Font Awesome 5 Free-Solid-900.otf", Alias = "FA-S")]

File diff suppressed because it is too large Load diff

View file

@ -16,7 +16,7 @@
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
<AndroidStoreUncompressedFileExtensions />
<MandroidI18n />
<JavaMaximumHeapSize>2G</JavaMaximumHeapSize>
@ -63,7 +63,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.2" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.3" />
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
<PackageReference Include="MonkeyCache">
<Version>1.5.2</Version>
@ -85,7 +85,7 @@
<PackageReference Include="Serilog">
<Version>2.10.0</Version>
</PackageReference>
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Xamarin" Version="0.2.0.64" />
<PackageReference Include="System.AppContext" Version="4.3.0" />
<PackageReference Include="System.Collections" Version="4.3.0" />
@ -136,7 +136,7 @@
<PackageReference Include="System.Xml.ReaderWriter" Version="4.3.1" />
<PackageReference Include="System.Xml.XDocument" Version="4.3.0" />
<PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
<PackageReference Include="Validation" Version="2.4.22" />
<PackageReference Include="Validation" Version="2.5.42" />
<PackageReference Include="Xam.Plugin.Connectivity">
<Version>3.2.0</Version>
</PackageReference>
@ -162,32 +162,32 @@
<PackageReference Include="Xamarin.Android.Support.v7.RecyclerView" Version="28.0.0.3" />
<PackageReference Include="Xamarin.Android.Support.Vector.Drawable" Version="28.0.0.3" />
<PackageReference Include="Xamarin.AndroidX.Core">
<Version>1.5.0</Version>
<Version>1.6.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.MediaRouter">
<Version>1.2.3</Version>
<Version>1.2.5</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Palette">
<Version>1.0.0.7</Version>
<Version>1.0.0.8</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.RecyclerView">
<Version>1.2.1</Version>
<Version>1.2.1.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
<PackageReference Include="Xamarin.Build.Download" Version="0.10.0" />
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>1.1.0</Version>
<Version>1.2.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.6.1</Version>
<Version>1.7.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2125" />
<PackageReference Include="Xamarin.Forms.GoogleMaps">
<Version>3.3.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps.Bindings" Version="2.2.0" />
<PackageReference Include="Xamarin.Forms.GoogleMaps.Bindings" Version="3.0.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="117.6.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="117.6.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="117.6.0.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="117.0.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="117.2.1" />
</ItemGroup>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@ -32,13 +32,11 @@
<string>TINK</string>
<key>XSAppIconAssets</key>
<string>Media.xcassets/AppIcons.appiconset</string>
<!--Description of the Bluetooth request message (required on iOS 13)-->
<key>NSBluetoothAlwaysUsageDescription</key>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Is required to communicate with Bluetooth lock.</string>
<!--Description of the Bluetooth request message (required on iOS 10, deprecated)-->
<key>NSBluetoothPeripheralUsageDescription</key>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>Is required to communicate with Bluetooth lock.</string>
<key>NSLocationAlwaysUsageDescription</key>
<key>NSLocationAlwaysUsageDescription</key>
<string>Is required to show map at current position and pass position to server when returning bike.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Is required to show map at current position and pass position to server when returning bike.</string>
@ -51,8 +49,8 @@
<key>CFBundleDisplayName</key>
<string>sharee.bike</string>
<key>CFBundleVersion</key>
<string>244</string>
<string>255</string>
<key>CFBundleShortVersionString</key>
<string>3.0.244</string>
<string>3.0.255</string>
</dict>
</plist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

View file

@ -114,7 +114,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Bcl.Build" Version="1.0.21" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.2" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.3" />
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
<PackageReference Include="MonkeyCache">
<Version>1.5.2</Version>
@ -132,7 +132,7 @@
<PackageReference Include="Serilog">
<Version>2.10.0</Version>
</PackageReference>
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Xamarin" Version="0.2.0.64" />
<PackageReference Include="System.AppContext" Version="4.3.0" />
<PackageReference Include="System.Collections" Version="4.3.0" />
@ -183,7 +183,7 @@
<PackageReference Include="System.Xml.ReaderWriter" Version="4.3.1" />
<PackageReference Include="System.Xml.XDocument" Version="4.3.0" />
<PackageReference Include="System.Xml.XmlDocument" Version="4.3.0" />
<PackageReference Include="Validation" Version="2.4.22" />
<PackageReference Include="Validation" Version="2.5.42" />
<PackageReference Include="Xam.Plugin.Connectivity">
<Version>3.2.0</Version>
</PackageReference>
@ -191,15 +191,15 @@
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
<PackageReference Include="Xamarin.Build.Download" Version="0.10.0" />
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>1.1.0</Version>
<Version>1.2.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.6.1</Version>
<Version>1.7.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps">
<Version>3.3.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps.Bindings" Version="2.2.0" />
<PackageReference Include="Xamarin.Forms.GoogleMaps.Bindings" Version="3.0.0" />
<PackageReference Include="Xamarin.Google.iOS.Maps" Version="3.9.0" />
<PackageReference Include="PInvoke.BCrypt">
<Version>0.7.104</Version>
@ -214,7 +214,7 @@
<Version>0.7.104</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms">
<Version>5.0.0.2012</Version>
<Version>5.0.0.2125</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
@ -247,6 +247,9 @@
<BundleResource Include="Resources\Icon-Small%402x.png" />
<BundleResource Include="Resources\Icon-Small%403x.png" />
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
<BundleResource Include="Resources\menu.png" />
<BundleResource Include="Resources\menu%402x.png" />
<BundleResource Include="Resources\menu%403x.png" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />

View file

@ -15,11 +15,11 @@ using MonkeyCache.FileStore;
using Plugin.Connectivity;
using System.Threading;
using TINK.Model.Settings;
using Plugin.Permissions;
using TINK.Services.BluetoothLock.Crypto;
using TINK.Model.Services.Geolocation;
using TINK.Services;
using System.Threading.Tasks;
using TINK.Services.Permissions;
#if ARENDI
using Arendi.BleLibrary.Local;
#endif
@ -124,8 +124,12 @@ namespace TINK
IStore store = null;
var lastVersion = JsonSettingsDictionary.GetAppVersion(settingsJSON);
if (lastVersion > new Version(3, 0, 173))
if (lastVersion > new Version(3, 0, 250))
{
// App versions newer than 3.0.173 stored geolocation service in configuration.
// Force a switch to typeof(GeolocationService) for versions < 3.0.251
GeolocationServicesContainer.SetActive(settings.ActiveGeolocationService);
}
store = new Store();
@ -263,10 +267,25 @@ namespace TINK
return LogEventLevel.Error;
}
/// <summary>
/// Holds the permission service instance.
/// </summary>
private static ILocationPermission _PermissionsService = null;
/// <summary>
/// Service to manage permissions (location) of the app.
/// </summary>
public static Plugin.Permissions.Abstractions.IPermissions PermissionsService => CrossPermissions.Current;
public static ILocationPermission PermissionsService
{
get
{
if (_PermissionsService != null)
return _PermissionsService;
_PermissionsService = new Services.Permissions.Plugin.Permissions();
return _PermissionsService;
}
}
/// <summary>
/// Service to manage bluetooth stack.
@ -277,11 +296,11 @@ namespace TINK
/// Service container to manage geolocation services.
/// </summary>
public static IServicesContainer<IGeolocation> GeolocationServicesContainer { get; }
= new Services.ServicesContainerMutable<Model.Services.Geolocation.IGeolocation>(
new HashSet<Model.Services.Geolocation.IGeolocation> {
= new ServicesContainerMutable<IGeolocation>(
new HashSet<IGeolocation> {
new LastKnownGeolocationService(DependencyService.Get<IGeolodationDependent>()),
new SimulatedGeolocationService(DependencyService.Get<IGeolodationDependent>()),
new GeolocationService(DependencyService.Get<IGeolodationDependent>()) },
typeof(LastKnownGeolocationService).FullName);
Model.Settings.Settings.DefaultLocationService.FullName);
}
}

View file

@ -14,6 +14,10 @@
<Frame>
<StackLayout
Orientation="Vertical">
<Label
HorizontalOptions="Center"
FontAttributes="Bold"
Text="{Binding StationDetailText}"/>
<ListView
x:Name="BikesAtStationListView"
SelectionMode="None"

View file

@ -46,9 +46,9 @@ namespace TINK.View.Contact
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
#if USEMASTERDETAIL || USEFLYOUT
public void ShowPage(ViewTypes p_oType, string p_strTitle = null)
=> throw new NotImplementedException();
#if USEFLYOUT
public void ShowPage(ViewTypes p_oType, string title = null)
=> NavigationMasterDetail.ShowPage(p_oType.GetViewType(), title);
#else
/// <summary> Shows a page.</summary>
/// <param name="route">Route of the page to show.</param>

View file

@ -5,8 +5,6 @@ using TINK.View.MasterDetail;
#endif
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.Contact
{

View file

@ -15,6 +15,7 @@
Placeholder="Fahrrad-Nummer bitte hier eingeben"
IsVisible="{Binding IsSelectBikeVisible}"
MaxLength="10"
CursorPosition="0"
Text="{Binding BikeIdUserInput}">
</Entry>
<Button

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.View.Root.RootPageFlyout"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.View.Root.RootPageFlyout"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:local="clr-namespace:TINK.View"
IconImageSource="Icon-Small@2x"
Title="sharee.bike">
IconImageSource="menu"
Title="sharee.bike">
<StackLayout>
<ListView x:Name="MenuItemsListView"
SeparatorVisibility="None"

View file

@ -142,7 +142,7 @@ namespace TINK.ViewModel.Root
if (!(theme is ITheme active))
return "sharee.bike";
return $"sharee.bike{(!string.IsNullOrEmpty(active.OperatorInfo) ? ($"\r\n{active.OperatorInfo}") : string.Empty)}";
return !string.IsNullOrEmpty(active.OperatorInfo) ? $"{active.OperatorInfo}" : "sharee.bike";
}
/// <summary>