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>