Version 3.0.265

This commit is contained in:
Oliver Hauff 2021-12-08 20:03:50 +01:00
parent bf8e3fa73a
commit de8d5f8414
49 changed files with 959 additions and 286 deletions

View file

@ -185,6 +185,9 @@
<Version>1.7.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2196" />
<PackageReference Include="Xamarin.Forms.AppLinks">
<Version>5.0.0.2244</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps">
<Version>3.3.0</Version>
</PackageReference>
@ -220,6 +223,7 @@
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<GoogleServicesJson Include="google-services.json" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<EmbeddedResource Include="Resources\Font Awesome 5 Free-Solid-900.otf" />

View file

@ -5,11 +5,28 @@ using Android.OS;
using Android.Content;
using Java.Interop;
using Plugin.Permissions;
using Xamarin.Forms.Platform.Android.AppLinks;
using Firebase;
namespace TINK.Droid
{
[Activity (Label = "LastenradBayern", Icon = "@drawable/sharee", Theme="@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
DataScheme = "https",
DataHost = "sharee.bike",
DataPathPrefix = "/lastenrad",
AutoVerify = true)]
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
DataScheme = "http",
DataHost = "sharee.bike",
DataPathPrefix = "/lastenrad",
AutoVerify = true)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate (Bundle bundle)
{
@ -20,6 +37,9 @@ namespace TINK.Droid
global::Xamarin.Forms.Forms.Init (this, bundle);
FirebaseApp.InitializeApp(this);
AndroidAppLinks.Init(this);
// Initialize xamarin.essentials, see https://docs.microsoft.com/en-us/xamarin/essentials/get-started?tabs=macos%2Candroid.
Xamarin.Essentials.Platform.Init(this, bundle);
@ -51,7 +71,7 @@ namespace TINK.Droid
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.

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.LastenradBayern" android:versionName="3.0.264" android:versionCode="264">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.LastenradBayern" android:versionName="3.0.265" android:versionCode="265">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services -->

View file

@ -14,7 +14,7 @@ namespace TINK.Droid
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.1.0.11")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{

View file

@ -0,0 +1,121 @@
{
"project_info": {
"project_number": "714659238786",
"project_id": "shareebikedeeplinking",
"storage_bucket": "shareebikedeeplinking.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:714659238786:android:d45a9f42bdf7c52cdab59b",
"android_client_info": {
"package_name": "com.TeilRad.LastenradBayern"
}
},
"oauth_client": [
{
"client_id": "714659238786-212vd9c0958et32cvi0s0ug76r7bttro.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.TeilRad.LastenradBayern",
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
}
},
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:714659238786:android:c2d1832deac081f6dab59b",
"android_client_info": {
"package_name": "com.TeilRad.Meinkonrad"
}
},
"oauth_client": [
{
"client_id": "714659238786-d5q3j4u1ohthdflriibd7kl1apb8nrka.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.TeilRad.Meinkonrad",
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
}
},
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:714659238786:android:503feb0fb8b9966ddab59b",
"android_client_info": {
"package_name": "com.hauffware.sharee"
}
},
"oauth_client": [
{
"client_id": "714659238786-ui21aoaetn0hj3gcktsvpot21afg01gu.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.hauffware.sharee",
"certificate_hash": "adc81d228a5d8dae7d588a6e698eed791c361343"
}
},
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View file

@ -6,5 +6,9 @@
<array>
<string>$(AppIdentifierPrefix)com.TeilRad.sharee.bike</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:sharee.bike</string>
</array>
</dict>
</plist>

View file

@ -49,8 +49,8 @@
<key>CFBundleDisplayName</key>
<string>LastenradBayern</string>
<key>CFBundleVersion</key>
<string>264</string>
<string>265</string>
<key>CFBundleShortVersionString</key>
<string>3.0.264</string>
<string>3.0.265</string>
</dict>
</plist>

View file

@ -53,10 +53,9 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignKey>Apple Development: Oliver Hauff (8SZ7J9P24J)</CodesignKey>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignProvision>VS: WildCard Development</CodesignProvision>
<MtouchLink>None</MtouchLink>
<MtouchInterpreter>-all</MtouchInterpreter>
</PropertyGroup>
@ -69,9 +68,9 @@
<WarningLevel>4</WarningLevel>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<ConsolePause>false</ConsolePause>
<CodesignKey>Apple Development: Oliver Hauff (8SZ7J9P24J)</CodesignKey>
<CodesignKey>Apple Distribution: TeilRad GmbH (LXJD6URCHR)</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignProvision>VS: WildCard Development</CodesignProvision>
<CodesignProvision>LastenradBayern to App Store 3</CodesignProvision>
<IpaIncludeArtwork>
</IpaIncludeArtwork>
<CrashReportingApiKey>
@ -1473,7 +1472,7 @@
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\Icon-167.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\Icon-1024.png">
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\iTunesArtwork%402x.png">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>

View file

@ -103,7 +103,7 @@
"idiom": "ipad"
},
{
"filename": "Icon-1024.png",
"filename": "iTunesArtwork@2x.png",
"size": "1024x1024",
"scale": "1x",
"idiom": "ios-marketing"

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

View file

@ -256,6 +256,30 @@ namespace TINK
.CreateLogger();
}
/// <param name="uri">The URI for the request.</param>
/// <summary>Overriden to respond when the user initiates an app link request.</summary>
protected override void OnAppLinkRequestReceived(Uri uri)
{
base.OnAppLinkRequestReceived(uri);
if (uri.Host.ToLower() == "sharee.bike")
{
// Input e.g. sharee.bike/sharee?lat=49.921&long=32.51
Array segments = Array.ConvertAll(uri.Segments, segment => segment.Replace("/", "")).Skip(1).ToArray();
if (uri.Query.Length > 0)
{
Dictionary<string, string> queryDict = uri.Query
.Substring(1)
.Split("&")
.Select(query => query.Split('='))
.ToDictionary(query => query.FirstOrDefault(), query => query.Skip(1).FirstOrDefault());
}
// segments == ["sharee"]
// queryDict == [{["lat", "49.921"]}], {["long", "32.51"]}]
// => Navigate and pass params depending on linkinput
// If no custom navigation is configured, the app just opens as if the user opened it
}
}
/// <summary> Gets the current logging level.</summary>
/// <returns></returns>
private static LogEventLevel GetCurrentLogEventLevel()

View file

@ -14,58 +14,69 @@
<Frame>
<StackLayout
Orientation="Vertical">
<Label
HorizontalOptions="Center"
FontAttributes="Bold"
Text="{Binding StationDetailText}"/>
<ListView
x:Name="BikesAtStationListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<Label
<!-- Title bar stack layout-->
<StackLayout
Orientation="Vertical">
<Label
HorizontalOptions="Center"
FontAttributes="Bold"
Text="{Binding StationDetailText}"/>
</StackLayout>
<!-- Center stack layout -->
<StackLayout
Orientation="Vertical"
VerticalOptions="CenterAndExpand">
<ListView
x:Name="BikesAtStationListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<Label
IsVisible="{Binding IsNoBikesAtStationVisible}"
VerticalOptions="EndAndExpand"
Text="{Binding NoBikesAtStationText}"/>
<Label
TextType="Html"
Text="{Binding ContactSupportHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<Label
</StackLayout>
<!-- Status bar stack layout-->
<StackLayout
Orientation="Vertical">
<Label
TextType="Html"
Text="{Binding ContactSupportHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<Label
IsVisible="{Binding IsLoginRequiredHintVisible}"
TextType="Html"
Text="{Binding LoginRequiredHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<StackLayout
VerticalOptions="EndAndExpand"
Orientation="Horizontal">
<Label
HeightRequest="20"
Text="{Binding StatusInfoText}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"/>
<ActivityIndicator IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color>
<OnPlatform x:TypeArguments="Color"
iOS="#2499CE" WinPhone="#2499CE" />
</ActivityIndicator.Color>
</ActivityIndicator>
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<StackLayout
Orientation="Horizontal">
<Label
HeightRequest="20"
Text="{Binding StatusInfoText}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"/>
<ActivityIndicator IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color>
<OnPlatform x:TypeArguments="Color"
iOS="#2499CE" WinPhone="#2499CE" />
</ActivityIndicator.Color>
</ActivityIndicator>
</StackLayout>
</StackLayout>
</StackLayout>
</Frame>

View file

@ -22,7 +22,7 @@
<Button
x:Name="TINKButton"
AutomationId ="FilterTINK_button"
Text="TINK"
Text="{x:Static resources:AppResources.MarkingCargoBike}"
Command="{Binding OnToggleKonradToTink}"
IsVisible="{Binding IsToggleVisible}"
TextColor ="{Binding TinkColor}"
@ -33,7 +33,7 @@
<Button
x:Name="KonradButton"
AutomationId ="FilterKonrad_button"
Text="Konrad"
Text="{x:Static resources:AppResources.MarkingCityBike}"
Command="{Binding OnToggleTinkToKonrad}"
IsVisible="{Binding IsToggleVisible}"
TextColor="{Binding KonradColor}"

View file

@ -214,7 +214,7 @@ namespace TINK.View.Map
Log.ForContext<MapPage>().Verbose("Moving and scaling map.");
MapPageViewModel.MoveAndScale(
(mapSpan) => MyMap.MoveToRegion(mapSpan),
App.ModelRoot.MapSpan);
App.ModelRoot.ActiveMapSpan);
}
/// <summary>

View file

@ -12,38 +12,43 @@
</ContentPage.Resources>
<ContentPage.Content>
<Frame>
<StackLayout>
<ListView
x:Name="MyBikesListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<StackLayout
VerticalOptions="EndAndExpand"
Orientation="Horizontal">
<StackLayout
Orientation="Vertical">
<!-- Center stack layout -->
<StackLayout
VerticalOptions="CenterAndExpand"
Orientation="Vertical">
<ListView
x:Name="MyBikesListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<Label
IsVisible="{Binding IsNoBikesOccupiedVisible}"
VerticalOptions="StartAndExpand"
Text="{Binding NoBikesOccupiedText}"/>
</StackLayout>
<!-- Status bar stack layout-->
<StackLayout
Orientation="Horizontal">
<Label
HeightRequest="20"
Text="{Binding StatusInfoText}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"/>
<ActivityIndicator IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color>
<OnPlatform x:TypeArguments="Color"
iOS="#2499CE" WinPhone="#2499CE" />
iOS="#2499CE" WinPhone="#2499CE" />
</ActivityIndicator.Color>
</ActivityIndicator>
</StackLayout>

View file

@ -5,11 +5,28 @@ using Android.OS;
using Android.Content;
using Java.Interop;
using Plugin.Permissions;
using Xamarin.Forms.Platform.Android.AppLinks;
using Firebase;
namespace TINK.Droid
{
[Activity (Label = "Mein konrad", Icon = "@drawable/sharee", Theme="@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
DataScheme = "https",
DataHost = "sharee.bike",
DataPathPrefix = "/meinkonrad",
AutoVerify = true)]
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
DataScheme = "http",
DataHost = "sharee.bike",
DataPathPrefix = "/meinkonrad",
AutoVerify = true)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate (Bundle bundle)
{
@ -20,6 +37,9 @@ namespace TINK.Droid
global::Xamarin.Forms.Forms.Init (this, bundle);
FirebaseApp.InitializeApp(this);
AndroidAppLinks.Init(this);
// Initialize xamarin.essentials, see https://docs.microsoft.com/en-us/xamarin/essentials/get-started?tabs=macos%2Candroid.
Xamarin.Essentials.Platform.Init(this, bundle);
@ -51,7 +71,7 @@ namespace TINK.Droid
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.

View file

@ -185,6 +185,9 @@
<Version>1.7.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2196" />
<PackageReference Include="Xamarin.Forms.AppLinks">
<Version>5.0.0.2244</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps">
<Version>3.3.0</Version>
</PackageReference>
@ -220,6 +223,7 @@
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<GoogleServicesJson Include="google-services.json" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<EmbeddedResource Include="Resources\Font Awesome 5 Free-Solid-900.otf" />

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.264" android:versionCode="264">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.265" android:versionCode="265">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services -->

View file

@ -14,7 +14,7 @@ namespace TINK.Droid
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.1.0.11")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{

View file

@ -0,0 +1,121 @@
{
"project_info": {
"project_number": "714659238786",
"project_id": "shareebikedeeplinking",
"storage_bucket": "shareebikedeeplinking.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:714659238786:android:d45a9f42bdf7c52cdab59b",
"android_client_info": {
"package_name": "com.TeilRad.LastenradBayern"
}
},
"oauth_client": [
{
"client_id": "714659238786-212vd9c0958et32cvi0s0ug76r7bttro.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.TeilRad.LastenradBayern",
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
}
},
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:714659238786:android:c2d1832deac081f6dab59b",
"android_client_info": {
"package_name": "com.TeilRad.Meinkonrad"
}
},
"oauth_client": [
{
"client_id": "714659238786-d5q3j4u1ohthdflriibd7kl1apb8nrka.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.TeilRad.Meinkonrad",
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
}
},
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:714659238786:android:503feb0fb8b9966ddab59b",
"android_client_info": {
"package_name": "com.hauffware.sharee"
}
},
"oauth_client": [
{
"client_id": "714659238786-ui21aoaetn0hj3gcktsvpot21afg01gu.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.hauffware.sharee",
"certificate_hash": "adc81d228a5d8dae7d588a6e698eed791c361343"
}
},
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View file

@ -6,5 +6,9 @@
<array>
<string>$(AppIdentifierPrefix)com.TeilRad.sharee.bike</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:sharee.bike</string>
</array>
</dict>
</plist>

View file

@ -49,8 +49,8 @@
<key>CFBundleDisplayName</key>
<string>Mein konrad</string>
<key>CFBundleVersion</key>
<string>264</string>
<string>265</string>
<key>CFBundleShortVersionString</key>
<string>3.0.264</string>
<string>3.0.265</string>
</dict>
</plist>

View file

@ -255,6 +255,30 @@ namespace TINK
.CreateLogger();
}
/// <param name="uri">The URI for the request.</param>
/// <summary>Overriden to respond when the user initiates an app link request.</summary>
protected override void OnAppLinkRequestReceived(Uri uri)
{
base.OnAppLinkRequestReceived(uri);
if (uri.Host.ToLower() == "sharee.bike")
{
// Input e.g. sharee.bike/sharee/?lat=49.921&long=32.51
Array segments = Array.ConvertAll(uri.Segments, segment => segment.Replace("/", "")).Skip(1).ToArray();
if (uri.Query.Length > 0)
{
Dictionary<string, string> queryDict = uri.Query
.Substring(1)
.Split("&")
.Select(query => query.Split('='))
.ToDictionary(query => query.FirstOrDefault(), query => query.Skip(1).FirstOrDefault());
}
// segments == ["sharee"]
// queryDict == [{["lat", "49.921"]}], {["long", "32.51"]}]
// => Navigate and pass params depending on linkinput
// If no custom navigation is configured, the app just opens as if the user opened it
}
}
/// <summary> Gets the current logging level.</summary>
/// <returns></returns>
private static LogEventLevel GetCurrentLogEventLevel()

View file

@ -14,58 +14,69 @@
<Frame>
<StackLayout
Orientation="Vertical">
<Label
HorizontalOptions="Center"
FontAttributes="Bold"
Text="{Binding StationDetailText}"/>
<ListView
x:Name="BikesAtStationListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<Label
<!-- Title bar stack layout-->
<StackLayout
Orientation="Vertical">
<Label
HorizontalOptions="Center"
FontAttributes="Bold"
Text="{Binding StationDetailText}"/>
</StackLayout>
<!-- Center stack layout -->
<StackLayout
Orientation="Vertical"
VerticalOptions="CenterAndExpand">
<ListView
x:Name="BikesAtStationListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<Label
IsVisible="{Binding IsNoBikesAtStationVisible}"
VerticalOptions="EndAndExpand"
Text="{Binding NoBikesAtStationText}"/>
<Label
TextType="Html"
Text="{Binding ContactSupportHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<Label
</StackLayout>
<!-- Status bar stack layout-->
<StackLayout
Orientation="Vertical">
<Label
TextType="Html"
Text="{Binding ContactSupportHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<Label
IsVisible="{Binding IsLoginRequiredHintVisible}"
TextType="Html"
Text="{Binding LoginRequiredHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<StackLayout
VerticalOptions="EndAndExpand"
Orientation="Horizontal">
<Label
HeightRequest="20"
Text="{Binding StatusInfoText}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"/>
<ActivityIndicator IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color>
<OnPlatform x:TypeArguments="Color"
iOS="#2499CE" WinPhone="#2499CE" />
</ActivityIndicator.Color>
</ActivityIndicator>
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<StackLayout
Orientation="Horizontal">
<Label
HeightRequest="20"
Text="{Binding StatusInfoText}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"/>
<ActivityIndicator IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color>
<OnPlatform x:TypeArguments="Color"
iOS="#2499CE" WinPhone="#2499CE" />
</ActivityIndicator.Color>
</ActivityIndicator>
</StackLayout>
</StackLayout>
</StackLayout>
</Frame>

View file

@ -4,7 +4,7 @@
xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps"
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
x:Class="TINK.View.Map.MapPage"
x:Class="TINK.View.Map.MapPage"
Title="{x:Static resources:AppResources.MarkingMapPage}">
<StackLayout>
<Grid
@ -22,7 +22,7 @@
<Button
x:Name="TINKButton"
AutomationId ="FilterTINK_button"
Text="Lastenrad"
Text="{x:Static resources:AppResources.MarkingCargoBike}"
Command="{Binding OnToggleKonradToTink}"
IsVisible="{Binding IsToggleVisible}"
TextColor ="{Binding TinkColor}"
@ -33,7 +33,7 @@
<Button
x:Name="KonradButton"
AutomationId ="FilterKonrad_button"
Text="Stadtrad"
Text="{x:Static resources:AppResources.MarkingCityBike}"
Command="{Binding OnToggleTinkToKonrad}"
IsVisible="{Binding IsToggleVisible}"
TextColor="{Binding KonradColor}"

View file

@ -214,7 +214,7 @@ namespace TINK.View.Map
Log.ForContext<MapPage>().Verbose("Moving and scaling map.");
MapPageViewModel.MoveAndScale(
(mapSpan) => MyMap.MoveToRegion(mapSpan),
App.ModelRoot.MapSpan);
App.ModelRoot.ActiveMapSpan);
}
/// <summary>

View file

@ -9,41 +9,46 @@
<ResourceDictionary>
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
</ResourceDictionary>
</ContentPage.Resources>
</ContentPage.Resources>
<ContentPage.Content>
<Frame>
<StackLayout>
<ListView
x:Name="MyBikesListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<StackLayout
VerticalOptions="EndAndExpand"
Orientation="Horizontal">
<StackLayout
Orientation="Vertical">
<!-- Center stack layout -->
<StackLayout
VerticalOptions="CenterAndExpand"
Orientation="Vertical">
<ListView
x:Name="MyBikesListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<Label
IsVisible="{Binding IsNoBikesOccupiedVisible}"
VerticalOptions="StartAndExpand"
Text="{Binding NoBikesOccupiedText}"/>
</StackLayout>
<!-- Status bar stack layout-->
<StackLayout
Orientation="Horizontal">
<Label
HeightRequest="20"
Text="{Binding StatusInfoText}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"/>
<ActivityIndicator IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color>
<OnPlatform x:TypeArguments="Color"
iOS="#2499CE" WinPhone="#2499CE" />
iOS="#2499CE" WinPhone="#2499CE" />
</ActivityIndicator.Color>
</ActivityIndicator>
</StackLayout>

View file

@ -5,11 +5,28 @@ using Android.OS;
using Android.Content;
using Java.Interop;
using Plugin.Permissions;
using Xamarin.Forms.Platform.Android.AppLinks;
using Firebase;
namespace TINK.Droid
{
[Activity (Label = "Sharee", Icon = "@drawable/sharee", Theme="@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
DataScheme = "https",
DataHost = "sharee.bike",
DataPathPrefix = "/sharee",
AutoVerify = true)]
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
DataScheme = "http",
DataHost = "sharee.bike",
DataPathPrefix = "/sharee",
AutoVerify = true)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate (Bundle bundle)
{
@ -20,6 +37,9 @@ namespace TINK.Droid
global::Xamarin.Forms.Forms.Init (this, bundle);
FirebaseApp.InitializeApp(this);
AndroidAppLinks.Init(this);
// Initialize xamarin.essentials, see https://docs.microsoft.com/en-us/xamarin/essentials/get-started?tabs=macos%2Candroid.
Xamarin.Essentials.Platform.Init(this, bundle);
@ -51,7 +71,7 @@ namespace TINK.Droid
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.

View file

@ -1,5 +1,5 @@
<?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.264" android:versionCode="264">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.hauffware.sharee" android:versionName="3.0.265" android:versionCode="265">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services -->

View file

@ -182,6 +182,9 @@
<Version>1.7.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2196" />
<PackageReference Include="Xamarin.Forms.AppLinks">
<Version>5.0.0.2244</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps">
<Version>3.3.0</Version>
</PackageReference>
@ -217,6 +220,7 @@
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<GoogleServicesJson Include="google-services.json" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<EmbeddedResource Include="Resources\Font Awesome 5 Free-Solid-900.otf" />

View file

@ -0,0 +1,121 @@
{
"project_info": {
"project_number": "714659238786",
"project_id": "shareebikedeeplinking",
"storage_bucket": "shareebikedeeplinking.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:714659238786:android:d45a9f42bdf7c52cdab59b",
"android_client_info": {
"package_name": "com.TeilRad.LastenradBayern"
}
},
"oauth_client": [
{
"client_id": "714659238786-212vd9c0958et32cvi0s0ug76r7bttro.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.TeilRad.LastenradBayern",
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
}
},
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:714659238786:android:c2d1832deac081f6dab59b",
"android_client_info": {
"package_name": "com.TeilRad.Meinkonrad"
}
},
"oauth_client": [
{
"client_id": "714659238786-d5q3j4u1ohthdflriibd7kl1apb8nrka.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.TeilRad.Meinkonrad",
"certificate_hash": "1b80c66db9ab80a7f87b6171065fdafce59ed1fe"
}
},
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:714659238786:android:503feb0fb8b9966ddab59b",
"android_client_info": {
"package_name": "com.hauffware.sharee"
}
},
"oauth_client": [
{
"client_id": "714659238786-ui21aoaetn0hj3gcktsvpot21afg01gu.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.hauffware.sharee",
"certificate_hash": "adc81d228a5d8dae7d588a6e698eed791c361343"
}
},
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAPzBFM3yImmcxgtt4Rx3A3_bRJRUISALw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "714659238786-lc3ktb9rh2tmc6pmbn4ntdqduj0sb07d.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View file

@ -6,5 +6,9 @@
<array>
<string>$(AppIdentifierPrefix)com.TeilRad.sharee.bike</string>
</array>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:sharee.bike</string>
</array>
</dict>
</plist>

View file

@ -49,8 +49,8 @@
<key>CFBundleDisplayName</key>
<string>sharee.bike</string>
<key>CFBundleVersion</key>
<string>264</string>
<string>265</string>
<key>CFBundleShortVersionString</key>
<string>3.0.264</string>
<string>3.0.265</string>
</dict>
</plist>

View file

@ -255,6 +255,30 @@ namespace TINK
.CreateLogger();
}
/// <param name="uri">The URI for the request.</param>
/// <summary>Overriden to respond when the user initiates an app link request.</summary>
protected override void OnAppLinkRequestReceived(Uri uri)
{
base.OnAppLinkRequestReceived(uri);
if (uri.Host.ToLower() == "sharee.bike")
{
// Input e.g. sharee.bike/sharee/?lat=49.921&long=32.51
Array segments = Array.ConvertAll(uri.Segments, segment => segment.Replace("/", "")).Skip(1).ToArray();
if (uri.Query.Length > 0)
{
Dictionary<string, string> queryDict = uri.Query
.Substring(1)
.Split("&")
.Select(query => query.Split('='))
.ToDictionary(query => query.FirstOrDefault(), query => query.Skip(1).FirstOrDefault());
}
// segments == ["sharee"]
// queryDict == [{["lat", "49.921"]}], {["long", "32.51"]}]
// => Navigate and pass params depending on linkinput
// If no custom navigation is configured, the app just opens as if the user opened it
}
}
/// <summary> Gets the current logging level.</summary>
/// <returns></returns>
private static LogEventLevel GetCurrentLogEventLevel()

View file

@ -14,58 +14,69 @@
<Frame>
<StackLayout
Orientation="Vertical">
<Label
HorizontalOptions="Center"
FontAttributes="Bold"
Text="{Binding StationDetailText}"/>
<ListView
x:Name="BikesAtStationListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<Label
<!-- Title bar stack layout-->
<StackLayout
Orientation="Vertical">
<Label
HorizontalOptions="Center"
FontAttributes="Bold"
Text="{Binding StationDetailText}"/>
</StackLayout>
<!-- Center stack layout -->
<StackLayout
Orientation="Vertical"
VerticalOptions="CenterAndExpand">
<ListView
x:Name="BikesAtStationListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<Label
IsVisible="{Binding IsNoBikesAtStationVisible}"
VerticalOptions="EndAndExpand"
Text="{Binding NoBikesAtStationText}"/>
<Label
TextType="Html"
Text="{Binding ContactSupportHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<Label
</StackLayout>
<!-- Status bar stack layout-->
<StackLayout
Orientation="Vertical">
<Label
TextType="Html"
Text="{Binding ContactSupportHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<Label
IsVisible="{Binding IsLoginRequiredHintVisible}"
TextType="Html"
Text="{Binding LoginRequiredHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<StackLayout
VerticalOptions="EndAndExpand"
Orientation="Horizontal">
<Label
HeightRequest="20"
Text="{Binding StatusInfoText}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"/>
<ActivityIndicator IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color>
<OnPlatform x:TypeArguments="Color"
iOS="#2499CE" WinPhone="#2499CE" />
</ActivityIndicator.Color>
</ActivityIndicator>
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<StackLayout
Orientation="Horizontal">
<Label
HeightRequest="20"
Text="{Binding StatusInfoText}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"/>
<ActivityIndicator IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color>
<OnPlatform x:TypeArguments="Color"
iOS="#2499CE" WinPhone="#2499CE" />
</ActivityIndicator.Color>
</ActivityIndicator>
</StackLayout>
</StackLayout>
</StackLayout>
</Frame>

View file

@ -22,7 +22,7 @@
<Button
x:Name="TINKButton"
AutomationId ="FilterTINK_button"
Text="TINK"
Text="{x:Static resources:AppResources.MarkingCargoBike}"
Command="{Binding OnToggleKonradToTink}"
IsVisible="{Binding IsToggleVisible}"
TextColor ="{Binding TinkColor}"
@ -33,7 +33,7 @@
<Button
x:Name="KonradButton"
AutomationId ="FilterKonrad_button"
Text="Konrad"
Text="{x:Static resources:AppResources.MarkingCityBike}"
Command="{Binding OnToggleTinkToKonrad}"
IsVisible="{Binding IsToggleVisible}"
TextColor="{Binding KonradColor}"

View file

@ -214,7 +214,7 @@ namespace TINK.View.Map
Log.ForContext<MapPage>().Verbose("Moving and scaling map.");
MapPageViewModel.MoveAndScale(
(mapSpan) => MyMap.MoveToRegion(mapSpan),
App.ModelRoot.MapSpan);
App.ModelRoot.ActiveMapSpan);
}
/// <summary>

View file

@ -9,41 +9,46 @@
<ResourceDictionary>
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
</ResourceDictionary>
</ContentPage.Resources>
</ContentPage.Resources>
<ContentPage.Content>
<Frame>
<StackLayout>
<ListView
x:Name="MyBikesListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<StackLayout
VerticalOptions="EndAndExpand"
Orientation="Horizontal">
<StackLayout
Orientation="Vertical">
<!-- Center stack layout -->
<StackLayout
VerticalOptions="CenterAndExpand"
Orientation="Vertical">
<ListView
x:Name="MyBikesListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<Label
IsVisible="{Binding IsNoBikesOccupiedVisible}"
VerticalOptions="StartAndExpand"
Text="{Binding NoBikesOccupiedText}"/>
</StackLayout>
<!-- Status bar stack layout-->
<StackLayout
Orientation="Horizontal">
<Label
HeightRequest="20"
Text="{Binding StatusInfoText}"
VerticalOptions="Center"
HorizontalOptions="FillAndExpand"/>
<ActivityIndicator IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
IsVisible="{Binding IsRunning}"
HeightRequest="20"
VerticalOptions="CenterAndExpand"
HorizontalOptions="End">
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color>
<OnPlatform x:TypeArguments="Color"
iOS="#2499CE" WinPhone="#2499CE" />
iOS="#2499CE" WinPhone="#2499CE" />
</ActivityIndicator.Color>
</ActivityIndicator>
</StackLayout>

View file

@ -60,8 +60,11 @@ namespace TINK.Model
/// <summary> Value indicating whether map is centerted to current position or not. </summary>
bool CenterMapToCurrentLocation { get; set; }
/// <summary> Holds the map area to display. </summary>
Xamarin.Forms.GoogleMaps.MapSpan MapSpan { get; set; }
/// <summary> Holds the map area where user is or was located or null if position is unknown. </summary>
Xamarin.Forms.GoogleMaps.MapSpan UserMapSpan { get; set; }
/// <summary> Holds the map span to display either default span or span centered to current position depending on option <see cref="CenterMapToCurrentLocation"/>.</summary>
Xamarin.Forms.GoogleMaps.MapSpan ActiveMapSpan { get; }
bool LogToExternalFolder { get; set; }

View file

@ -65,8 +65,17 @@ namespace TINK.Model
/// <summary> Value indicating whether map is centerted to current position or not. </summary>
public bool CenterMapToCurrentLocation { get; set; }
/// <summary> Holds the map area to display. </summary>
public Xamarin.Forms.GoogleMaps.MapSpan MapSpan { get; set; }
/// <summary> Holds the map area to display when starting app for first time/ when center map to is off. </summary>
private Xamarin.Forms.GoogleMaps.MapSpan HomeMapSpan { get; }
/// <summary> Holds the map area where user is or was located or null if this position is unknown. </summary>
public Xamarin.Forms.GoogleMaps.MapSpan UserMapSpan { get; set; } = null;
/// <summary> Holds the map span to display either default span or span centered to current position depending on option <see cref="CenterMapToCurrentLocation"/>.</summary>
public Xamarin.Forms.GoogleMaps.MapSpan ActiveMapSpan
=> CenterMapToCurrentLocation
? UserMapSpan ?? HomeMapSpan
: HomeMapSpan;
/// <summary> Gets the minimum logging level. </summary>
public LogEventLevel MinimumLogEventLevel { get; set; }
@ -211,7 +220,7 @@ namespace TINK.Model
CenterMapToCurrentLocation = settings.CenterMapToCurrentLocation;
MapSpan = settings.MapSpan;
HomeMapSpan = settings.MapSpan;
SmartDevice = device
?? throw new ArgumentException("Can not instantiate TinkApp- object. No device information provider available.");

View file

@ -466,6 +466,10 @@ namespace TINK.Model
{
new Version(3, 0, 264),
AppResources.ChangeLog3_0_264
},
{
new Version(3, 0, 265),
AppResources.ChangeLog3_0_265
}
};

View file

@ -889,6 +889,17 @@ namespace TINK.MultilingualResources {
}
}
/// <summary>
/// Looks up a localized string similar to Filter functionality city bike/ cargo bike improved.
///Layouting improved.
///App supports deep linking..
/// </summary>
public static string ChangeLog3_0_265 {
get {
return ResourceManager.GetString("ChangeLog3_0_265", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Lock of rented bike can not be found..
/// </summary>
@ -1239,6 +1250,24 @@ namespace TINK.MultilingualResources {
}
}
/// <summary>
/// Looks up a localized string similar to Cargo bike.
/// </summary>
public static string MarkingCargoBike {
get {
return ResourceManager.GetString("MarkingCargoBike", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to City bike.
/// </summary>
public static string MarkingCityBike {
get {
return ResourceManager.GetString("MarkingCityBike", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Please open a bike station page to to contact the bike sharing operator..
/// </summary>
@ -1593,7 +1622,7 @@ namespace TINK.MultilingualResources {
}
/// <summary>
/// Looks up a localized string similar to Tariff {0}, nr. {1}.
/// Looks up a localized string similar to Tariff {0}.
/// </summary>
public static string MessageBikesManagementTariffDescriptionTariffHeader {
get {
@ -1601,6 +1630,15 @@ namespace TINK.MultilingualResources {
}
}
/// <summary>
/// Looks up a localized string similar to Tariff {0}, nr. {1}.
/// </summary>
public static string MessageBikesManagementTariffDescriptionTariffHeaderNameId {
get {
return ResourceManager.GetString("MessageBikesManagementTariffDescriptionTariffHeaderNameId", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Please allow location sharing so that map can be centered.
///Open sharing dialog?.

View file

@ -484,7 +484,7 @@ Bitte App neu starten um Rad Infos zu bekommen.</value>
<value>Std./Tag</value>
</data>
<data name="MessageBikesManagementTariffDescriptionTariffHeader" xml:space="preserve">
<value>Tarif {0}, Nr. {1}</value>
<value>Tarif {0}</value>
</data>
<data name="ActivityTextQuerryServer" xml:space="preserve">
<value>Anfrage Server...</value>
@ -716,4 +716,18 @@ Kleine Verbesserungen.</value>
<data name="ChangeLog3_0_264" xml:space="preserve">
<value>Fehler "object reference not set ...." &lt;a href="https://dev.azure.com/TeilRad/sharee.bike%20App/_workitems/edit/186"&gt;185&lt;/a&gt; behoben.</value>
</data>
<data name="ChangeLog3_0_265" xml:space="preserve">
<value>Filterfunktion Stadtrad/ Lastenrad verbessert.
Layouting verbessert.
Deep linking wird unterstützt.</value>
</data>
<data name="MarkingCargoBike" xml:space="preserve">
<value>Lastenrad</value>
</data>
<data name="MarkingCityBike" xml:space="preserve">
<value>Stadtrad</value>
</data>
<data name="MessageBikesManagementTariffDescriptionTariffHeaderNameId" xml:space="preserve">
<value>Tarif {0}, Nr. {1}</value>
</data>
</root>

View file

@ -593,7 +593,7 @@ Please restart app in order to get bike info.</value>
<value>Max. fee</value>
</data>
<data name="MessageBikesManagementTariffDescriptionTariffHeader" xml:space="preserve">
<value>Tariff {0}, nr. {1}</value>
<value>Tariff {0}</value>
</data>
<data name="ActivityTextQuerryServer" xml:space="preserve">
<value>Request server...</value>
@ -811,4 +811,18 @@ Minor improvements.</value>
<data name="ChangeLog3_0_264" xml:space="preserve">
<value>Bug "object reference not set ...." &lt;a href="https://dev.azure.com/TeilRad/sharee.bike%20App/_workitems/edit/186"&gt;185&lt;/a&gt; fixed.</value>
</data>
<data name="ChangeLog3_0_265" xml:space="preserve">
<value>Filter functionality city bike/ cargo bike improved.
Layouting improved.
App supports deep linking.</value>
</data>
<data name="MarkingCargoBike" xml:space="preserve">
<value>Cargo bike</value>
</data>
<data name="MarkingCityBike" xml:space="preserve">
<value>City bike</value>
</data>
<data name="MessageBikesManagementTariffDescriptionTariffHeaderNameId" xml:space="preserve">
<value>Tariff {0}, nr. {1}</value>
</data>
</root>

View file

@ -645,8 +645,8 @@ Bitte App neu starten um Rad Infos zu bekommen.</target>
<target state="translated">Std./Tag</target>
</trans-unit>
<trans-unit id="MessageBikesManagementTariffDescriptionTariffHeader" translate="yes" xml:space="preserve">
<source>Tariff {0}, nr. {1}</source>
<target state="translated">Tarif {0}, Nr. {1}</target>
<source>Tariff {0}</source>
<target state="translated">Tarif {0}</target>
</trans-unit>
<trans-unit id="ActivityTextQuerryServer" translate="yes" xml:space="preserve">
<source>Request server...</source>
@ -960,6 +960,26 @@ Kleine Verbesserungen.</target>
<source>Bug "object reference not set ...." <bpt id="1">&lt;a href="https://dev.azure.com/TeilRad/sharee.bike%20App/_workitems/edit/186"&gt;</bpt>185<ept id="1">&lt;/a&gt;</ept> fixed.</source>
<target state="translated">Fehler "object reference not set ...." <bpt id="1">&lt;a href="https://dev.azure.com/TeilRad/sharee.bike%20App/_workitems/edit/186"&gt;</bpt>185<ept id="1">&lt;/a&gt;</ept> behoben.</target>
</trans-unit>
<trans-unit id="ChangeLog3_0_265" translate="yes" xml:space="preserve">
<source>Filter functionality city bike/ cargo bike improved.
Layouting improved.
App supports deep linking.</source>
<target state="translated">Filterfunktion Stadtrad/ Lastenrad verbessert.
Layouting verbessert.
Deep linking wird unterstützt.</target>
</trans-unit>
<trans-unit id="MarkingCargoBike" translate="yes" xml:space="preserve">
<source>Cargo bike</source>
<target state="translated">Lastenrad</target>
</trans-unit>
<trans-unit id="MarkingCityBike" translate="yes" xml:space="preserve">
<source>City bike</source>
<target state="translated">Stadtrad</target>
</trans-unit>
<trans-unit id="MessageBikesManagementTariffDescriptionTariffHeaderNameId" translate="yes" xml:space="preserve">
<source>Tariff {0}, nr. {1}</source>
<target state="translated">Tarif {0}, Nr. {1}</target>
</trans-unit>
</group>
</body>
</file>

View file

@ -28,11 +28,15 @@ namespace TINK.ViewModel.Bikes.Bike
return string.Empty;
#if USCSHARP9
return string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeader, Tariff?.Name ?? "-", Tariff?.Number != null ? Tariff.Number : "-");
return Tariff?.Number != null
? string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeaderNameId, Tariff?.Name ?? "-", Tariff?.Number != null ? Tariff.Number : "-");
: string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeader, Tariff?.Name ?? "-");
#else
return string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeader, Tariff?.Name ?? "-", Tariff?.Number != null ? Tariff.Number.ToString() : "-");
#endif
}
return Tariff?.Number != null
? string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeaderNameId, Tariff?.Name ?? "-", Tariff?.Number != null ? Tariff.Number.ToString() : "-")
: string.Format(AppResources.MessageBikesManagementTariffDescriptionTariffHeader, Tariff?.Name ?? "-");
#endif
}
}
/// <summary>

View file

@ -433,15 +433,15 @@ namespace TINK.ViewModel.Map
if (currentLocation != null)
{
TinkApp.MapSpan = MapSpan.FromCenterAndRadius(
TinkApp.UserMapSpan = MapSpan.FromCenterAndRadius(
new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
TinkApp.MapSpan.Radius);
TinkApp.ActiveMapSpan.Radius);
TinkApp.Save();
}
}
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.MapSpan);
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.ActiveMapSpan);
m_oViewUpdateManager = CreateUpdateTask();
@ -887,16 +887,16 @@ namespace TINK.ViewModel.Map
if (currentLocation != null)
{
TinkApp.MapSpan = MapSpan.FromCenterAndRadius(
TinkApp.UserMapSpan = MapSpan.FromCenterAndRadius(
new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
TinkApp.MapSpan.Radius);
TinkApp.ActiveMapSpan.Radius);
TinkApp.Save();
}
}
// Update stations
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.MapSpan);
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.ActiveMapSpan);
IsConnected = TinkApp.GetIsConnected();
var resultStationsAndBikes = await TinkApp.GetConnector(IsConnected).Query.GetBikesAndStationsAsync();

View file

@ -9,21 +9,21 @@ namespace TINK.ViewModel.Settings
private bool m_bIsActivatedSwitch;
/// <summary> Constructs a filter object. </summary>
/// <param name="p_strKey">Key of the filter state.</param>
/// <param name="p_oFilterState">State of filter, on or off.</param>
/// <param name="p_bIsEnabled">If filter does not apply because user does not belong to group (TINK, Konrad, ...) filter is deactivated.</param>
/// <param name="p_strLabelText">Text of the switch describing the filter.</param>
/// <param name="key">Key of the filter state.</param>
/// <param name="filterState">State of filter, on or off.</param>
/// <param name="isEnabled">If filter does not apply because user does not belong to group (TINK, Konrad, ...) filter is deactivated.</param>
/// <param name="labelText">Text of the switch describing the filter.</param>
public FilterItemMutable(
string p_strKey,
FilterState p_oFilterState,
bool p_bIsEnabled,
string p_strLabelText)
string key,
FilterState filterState,
bool isEnabled,
string labelText)
{
Text = p_strLabelText;
IsEnabled = p_bIsEnabled;
State = p_oFilterState;
Key = p_strKey;
m_bIsActivatedSwitch = p_bIsEnabled && p_oFilterState == FilterState.On;
Text = labelText;
IsEnabled = isEnabled;
State = filterState;
Key = key;
m_bIsActivatedSwitch = isEnabled && filterState == FilterState.On;
}
/// <summary> Text describing the filter. </summary>

View file

@ -3,6 +3,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using TINK.Model;
using TINK.Model.Connector;
using TINK.MultilingualResources;
namespace TINK.ViewModel.Settings
{
@ -11,38 +12,38 @@ namespace TINK.ViewModel.Settings
public class SettingsBikeFilterViewModel : ObservableCollection<FilterItemMutable>
{
/// <summary> Constructs a filter collection object.</summary>
/// <param name="p_oFilterSettings">All available filters.</param>
/// <param name="p_oFilterGroupUser">Filters which apply to logged in user.</param>
/// <param name="filterSettings">All available filters.</param>
/// <param name="filterGroupUser">Filters which apply to logged in user.</param>
public SettingsBikeFilterViewModel(
IGroupFilterSettings p_oFilterSettings,
IEnumerable<string> p_oFilterGroupUser)
IGroupFilterSettings filterSettings,
IEnumerable<string> filterGroupUser)
{
foreach (var l_oFilter in p_oFilterSettings)
foreach (var filter in filterSettings)
{
if (l_oFilter.Key == FilterHelper.FILTERTINKGENERAL)
if (filter.Key == FilterHelper.FILTERTINKGENERAL)
{
Add(new FilterItemMutable(
l_oFilter.Key,
l_oFilter.Value,
p_oFilterGroupUser != null ? p_oFilterGroupUser.Contains(l_oFilter.Key) : true,
"TINK Lastenräder"));
filter.Key,
filter.Value,
(filterGroupUser != null && filterGroupUser.Count() > 0) ? filterGroupUser.Contains(filter.Key) : true,
AppResources.MarkingCargoBike));
continue;
}
if (l_oFilter.Key == FilterHelper.FILTERKONRAD)
if (filter.Key == FilterHelper.FILTERKONRAD)
{
Add(new FilterItemMutable(
l_oFilter.Key,
l_oFilter.Value,
p_oFilterGroupUser != null ? p_oFilterGroupUser.Contains(l_oFilter.Key) : true,
"Konrad Stadträder"));
filter.Key,
filter.Value,
(filterGroupUser != null && filterGroupUser.Count() > 0) ? filterGroupUser.Contains(filter.Key) : true,
AppResources.MarkingCityBike));
continue;
}
Add(new FilterItemMutable(
l_oFilter.Key,
l_oFilter.Value,
p_oFilterGroupUser != null ? p_oFilterGroupUser.Contains(l_oFilter.Key) : true,
l_oFilter.Key));
filter.Key,
filter.Value,
filterGroupUser != null ? filterGroupUser.Contains(filter.Key) : true,
filter.Key));
}
}
@ -51,13 +52,13 @@ namespace TINK.ViewModel.Settings
{
get
{
var l_Dictionary = new Dictionary<string, FilterState>();
foreach (var l_oEntry in this)
var dictionary = new Dictionary<string, FilterState>();
foreach (var entry in this)
{
l_Dictionary.Add(l_oEntry.Key, l_oEntry.State);
dictionary.Add(entry.Key, entry.State);
}
return l_Dictionary;
return dictionary;
}
}
}