Version 3.0.350

This commit is contained in:
Anja 2022-11-17 10:05:05 +01:00
parent 7f49fb0ac5
commit 40b96f0350
70 changed files with 12021 additions and 8388 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

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>v12.0</TargetFrameworkVersion>
<AndroidStoreUncompressedFileExtensions />
<MandroidI18n />
<JavaMaximumHeapSize>2G</JavaMaximumHeapSize>
@ -77,7 +77,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="6.0.5" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.0" />
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
<PackageReference Include="MonkeyCache">
<Version>1.6.3</Version>
@ -97,7 +97,7 @@
<Version>6.3.0.19</Version>
</PackageReference>
<PackageReference Include="Serilog">
<Version>2.11.0</Version>
<Version>2.12.0</Version>
</PackageReference>
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
@ -176,21 +176,21 @@
<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.6.0.3</Version>
<Version>1.9.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.MediaRouter">
<Version>1.2.5.2</Version>
<Version>1.3.1.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Palette">
<Version>1.0.0.10</Version>
<Version>1.0.0.15</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.RecyclerView">
<Version>1.2.1.3</Version>
<Version>1.2.1.8</Version>
</PackageReference>
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
<PackageReference Include="Xamarin.Build.Download" Version="0.11.3" />
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>2.0.4</Version>
<Version>2.0.5</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.7.3</Version>
@ -200,13 +200,13 @@
<Version>5.0.0.2515</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps">
<Version>3.3.0</Version>
<Version>5.0.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps.Bindings" Version="3.0.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="117.6.0.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="117.6.0.2" />
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="117.0.1.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="117.2.1.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.1.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="118.1.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.1.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="118.0.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
@ -283,6 +283,9 @@
<ItemGroup>
<AndroidAsset Include="Assets\Open_Red.png" />
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Assets\Location_Pin.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\battery_undefined.png" />
</ItemGroup>
@ -342,6 +345,11 @@
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxxhdpi\sharee_no_background.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\Location_Button.png">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
</AndroidResource>
</ItemGroup>
<Import Project="..\TINK\LastenradBayern.projitems" Label="Shared" Condition="Exists('..\TINK\LastenradBayern.projitems')" />
<Import Project="..\..\ShareeSharedGuiLib\ShareeSharedGuiLib.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />

View file

@ -1,19 +1,28 @@
using System.Collections.Generic;
using Android.App;
using Android.Content;
using Android.Content.PM;
using Android.Content.Res;
using Android.OS;
using Android.Runtime;
using Android.Util;
using Firebase;
using Java.Interop;
using Plugin.Permissions;
using TINK.Model;
using Xamarin.Essentials;
using Xamarin.Forms.Platform.Android.AppLinks;
using static Xamarin.Essentials.Permissions;
namespace TINK.Droid
{
[Activity(Label = "LastenradBayern", Icon = "@drawable/sharee", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Activity(
Label = "LastenradBayern",
Icon = "@drawable/sharee",
Theme = "@style/MainTheme",
MainLauncher = true,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
@ -41,7 +50,7 @@ namespace TINK.Droid
metrics.ScaledDensity = configuration.FontScale * metrics.Density;
BaseContext.Resources.UpdateConfiguration(configuration, metrics);
}
protected override void OnCreate(Bundle bundle)
protected override async void OnCreate(Bundle bundle)
{
initFontScale();
@ -76,28 +85,54 @@ namespace TINK.Droid
}
};
await Permissions.RequestAsync<BLEAndLocationPermissions>();
LoadApplication(new App());
}
//Bluetooth Permission on Android 12 "Detect Devices nearby"
// https://stackoverflow.com/questions/71028853/xamarin-forms-ble-plugin-scan-issue-android-12
public class BLEAndLocationPermissions : BasePlatformPermission
{
public override (string androidPermission, bool isRuntime)[] RequiredPermissions => new List<(string androidPermission, bool isRuntime)>
{
(Android.Manifest.Permission.BluetoothScan, true),
(Android.Manifest.Permission.BluetoothConnect, true),
(Android.Manifest.Permission.AccessFineLocation, true)
}.ToArray();
}
/// <summary>
/// Handles opening the dialog to request for permissions.
/// </summary>
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Android.Content.PM.Permission[] grantResults)
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] 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);
}
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
/// <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="internalOnly" package="com.TeilRad.LastenradBayern" android:versionName="3.0.347" android:versionCode="347">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.LastenradBayern" android:versionName="3.0.350" android:versionCode="350">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
<!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services -->
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
@ -9,13 +9,18 @@
<!-- Access Google based webservices -->
<!-- External storage for caching. -->
<!-- My Location -->
<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_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<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="LastenradBayern" android:allowBackup="false"></application>
<queries>
@ -33,4 +38,4 @@
</intent>
</queries>
<meta-data android:name="com.google.android.geo.API_KEY" android:value="000000000000000000000000000000000000000" />
</manifest>
</manifest>

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,4 +1,4 @@
using Foundation;
using Foundation;
using UIKit;
using Xamarin.Forms;
@ -24,6 +24,9 @@ namespace TINK.iOS
//Color of Icons in Navigation bar (e.g. burger menu and back arrow)
//UINavigationBar.Appearance.TintColor = Color.White.ToUIColor();
//Color of Switch
//UISwitch.Appearance.OnTintColor = UIColor.LightGray;
new iOS.Device.AppInfo(NSBundle.MainBundle.InfoDictionary[new NSString("CFBundleShortVersionString")]?.ToString() ?? string.Empty);
Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) =>

View file

@ -55,8 +55,8 @@
<key>CFBundleDisplayName</key>
<string>LastenradBayern</string>
<key>CFBundleVersion</key>
<string>347</string>
<string>350</string>
<key>CFBundleShortVersionString</key>
<string>3.0.347</string>
<string>3.0.350</string>
</dict>
</plist>

View file

@ -319,6 +319,18 @@
<ImageAsset Include="Media.xcassets\Open_Red.imageset\StationMarkerOpenRed.pdf">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Pin.imageset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Pin.imageset\Location_Pin.pdf">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Button.imageset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Button.imageset\Location_Button.svg">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\Icon-40.png">
<Visible>false</Visible>
</ImageAsset>
@ -435,6 +447,8 @@
<Folder Include="Media.xcassets\Open_Green.imageset\" />
<Folder Include="Media.xcassets\Open_LightBlue.imageset\" />
<Folder Include="Media.xcassets\Open_Red.imageset\" />
<Folder Include="Media.xcassets\Location_Pin.imageset\" />
<Folder Include="Media.xcassets\Location_Button.imageset\" />
<Folder Include="Media.xcassets\sharee_no_background.imageset\" />
</ItemGroup>
<Import Project="..\TINK\LastenradBayern.projitems" Label="Shared" Condition="Exists('..\TINK\LastenradBayern.projitems')" />

View file

@ -0,0 +1,393 @@
{
"images" : [
{
"filename" : "Location_Button.svg",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal"
},
{
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "3x"
},
{
"idiom" : "iphone"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone"
},
{
"idiom" : "iphone",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "1x"
},
{
"idiom" : "iphone",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "2x"
},
{
"idiom" : "iphone",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "3x"
},
{
"idiom" : "iphone",
"scale" : "1x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "1x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "1x",
"subtype" : "retina4"
},
{
"idiom" : "iphone",
"scale" : "2x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "2x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "2x",
"subtype" : "retina4"
},
{
"idiom" : "iphone",
"scale" : "3x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "3x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "3x",
"subtype" : "retina4"
},
{
"idiom" : "ipad"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "ipad"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "ipad"
},
{
"idiom" : "ipad",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "ipad",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "ipad",
"scale" : "1x"
},
{
"idiom" : "ipad",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "ipad",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "ipad",
"scale" : "2x"
},
{
"idiom" : "car",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "car",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "car",
"scale" : "2x"
},
{
"idiom" : "car",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "car",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "car",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="56.000221"
height="56.000034"
viewBox="0 0 14.816725 14.816675"
version="1.1"
id="svg5"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
sodipodi:docname="Location_Button.svg"
inkscape:export-filename="C:\Users\Anja\Desktop\Location_Button.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.74901961"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="true"
fit-margin-top="5"
fit-margin-left="5"
fit-margin-right="5"
fit-margin-bottom="5"
inkscape:zoom="11.402918"
inkscape:cx="17.407825"
inkscape:cy="24.642815"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g1443"
units="px"
lock-margins="true">
<inkscape:grid
type="xygrid"
id="grid1378"
originx="3.43958"
originy="3.4395888" />
</sodipodi:namedview>
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-43.106273,-79.915487)">
<g
id="g1443">
<ellipse
style="fill:none;fill-opacity:1;stroke:#333333;stroke-width:1.05833;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="path846"
cx="50.523026"
cy="87.332237"
inkscape:export-filename="C:\Users\Anja\Desktop\Location_Pin.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
rx="3.9684811"
ry="3.9684813" />
<circle
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.61265;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="path1042"
cx="50.534115"
cy="87.326935"
r="1.5875" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35094;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296"
width="1.0583333"
height="2.6458333"
x="49.985435"
y="81.238403" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35094;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296-9"
width="1.0583333"
height="2.6458333"
x="49.985435"
y="90.763412" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35093;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296-0"
width="1.0583172"
height="2.6458309"
x="86.794319"
y="-56.600288"
transform="matrix(-2.3780451e-6,1,-1,-6.0876213e-6,0,0)" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35093;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296-0-8"
width="1.0583172"
height="2.6458309"
x="86.794388"
y="-47.07523"
transform="matrix(-2.3780451e-6,1,-1,-6.0876213e-6,0,0)" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -0,0 +1,354 @@
{
"images": [
{
"appearances": [],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [],
"idiom": "iphone"
},
{
"appearances": [],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [],
"scale": "2x",
"idiom": "iphone",
"subtype": "retina4"
},
{
"appearances": [],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [],
"idiom": "ipad"
},
{
"appearances": [],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [],
"scale": "3x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "iphone",
"subtype": "retina4"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "iphone",
"subtype": "retina4"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "car"
},
{
"appearances": [],
"idiom": "universal",
"filename": "Location_Pin.pdf"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}

View file

@ -0,0 +1,70 @@
%PDF-1.5
%µí®û
4 0 obj
<< /Length 5 0 R
/Filter /FlateDecode
>>
stream
xœÕ<EFBFBD>A
1 E÷9Å¿€1iÆNçàbt).dÄÁÅèÂëjg@=<3D> ýä“ßGª¯™ºTÊ!˜iDw¥<77>¹6KÌþN­ü^h·‡°àHÖ /Ö[a)ó„£®(Þ„­õ#R\N©.ž0½ƒ<>·%3F'Ftá}Ñ&ÆùgÃ-ZòåÙbŠ¡ö¦ºˆ n=þï3'jé Õ[ƒ
endstream
endobj
5 0 obj
165
endobj
3 0 obj
<<
/ExtGState <<
/a0 << /CA 1 /ca 1 >>
>>
>>
endobj
2 0 obj
<< /Type /Page % 1
/Parent 1 0 R
/MediaBox [ 0 0 41.223316 41.223316 ]
/Contents 4 0 R
/Group <<
/Type /Group
/S /Transparency
/I true
/CS /DeviceRGB
>>
/Resources 3 0 R
>>
endobj
1 0 obj
<< /Type /Pages
/Kids [ 2 0 R ]
/Count 1
>>
endobj
6 0 obj
<< /Producer (cairo 1.17.4 (https://cairographics.org))
/Creator <FEFF0049006E006B0073006300610070006500200031002E0031002E00320020002800680074007400700073003A002F002F0069006E006B00730063006100700065002E006F007200670029>
/CreationDate (D:20221116092441+01'00)
>>
endobj
7 0 obj
<< /Type /Catalog
/Pages 1 0 R
>>
endobj
xref
0 8
0000000000 65535 f
0000000581 00000 n
0000000351 00000 n
0000000279 00000 n
0000000015 00000 n
0000000257 00000 n
0000000646 00000 n
0000000929 00000 n
trailer
<< /Size 8
/Root 7 0 R
/Info 6 0 R
>>
startxref
981
%%EOF

View file

@ -23,6 +23,11 @@
<x:String x:Key="IconInfo">&#xf05a;</x:String>
<!--<x:String x:Key="IconClose">&#xf00d;</x:String>-->
<!--<x:String x:Key="IconClose">&#xf410;</x:String>-->
<!--TogglePasswortEntry-->
<x:String x:Key="EyeOpen">&#xf06e;</x:String>
<x:String x:Key="EyeClose">&#xf070;</x:String>
<!-- Add more resources here -->
<ResourceDictionary.MergedDictionaries>
<!-- Add more resource dictionaries here -->

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

View file

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
x:Class="TINK.View.Login.LoginPage">
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
x:Class="TINK.View.Login.LoginPage">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Label Style="{StaticResource Label-Navbar}"
@ -24,14 +25,14 @@
Text="{Binding MailAddress}"
IsEnabled="{Binding IsLoggedOut}"/>
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordLabel}"/>
<Entry
<Entry
Placeholder="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
AutomationId="password_text"
IsPassword="true"
x:Name="PasswordEntry"
Text="{Binding Password}"
IsEnabled="{Binding IsLoggedOut}"/>
<Button
<Button
Text="{x:Static resources:AppResources.ActionLoginLogin}"
AutomationId="login_button"
Command="{Binding OnLoginRequest}"
@ -156,4 +157,4 @@
</StackLayout>
</Frame>
</ScrollView>-->
</ContentPage>
</ContentPage>

View file

@ -89,6 +89,24 @@
</StackLayout>
</Frame>
<!--Center to currentLocation Button-->
<ImageButton
Grid.Row="2"
Grid.ColumnSpan="3"
x:Name="CurrentLocation"
AutomationId ="currentLocaton_button"
Command="{Binding OnCurrentLocationButtonClicked}"
IsVisible="True"
BackgroundColor="Transparent"
VerticalOptions="End"
HorizontalOptions="End"
Margin="0,0,11,100"
Source="Location_Button.png"
WidthRequest="40"
HeightRequest="40"
CornerRadius="20">
</ImageButton>
<!--While process is running-->
<!--Spinner-->
<ActivityIndicator

View file

@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="Plugin.BLE" Version="2.1.3" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="Serilog" Version="2.11.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.3" />
</ItemGroup>

View file

@ -23,7 +23,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Serilog" Version="2.11.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
</ItemGroup>
<ItemGroup>
<Compile Update="MultilingualResources\Resources.Designer.cs">

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,4 +1,5 @@

using System.Collections.Generic;
using Android.App;
using Android.Content;
using Android.Content.PM;
@ -7,12 +8,21 @@ using Android.OS;
using Android.Util;
using Firebase;
using Java.Interop;
using Java.Security.Acl;
using Plugin.Permissions;
using Xamarin.Forms.Platform.Android.AppLinks;
using static Xamarin.Essentials.Permissions;
using Xamarin.Essentials;
using Android.Runtime;
namespace TINK.Droid
{
[Activity(Label = "Mein konrad", Icon = "@drawable/sharee", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Activity(
Label = "Mein konrad",
Icon = "@drawable/sharee",
Theme = "@style/MainTheme",
MainLauncher = true,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
@ -40,7 +50,7 @@ namespace TINK.Droid
metrics.ScaledDensity = configuration.FontScale * metrics.Density;
BaseContext.Resources.UpdateConfiguration(configuration, metrics);
}
protected override void OnCreate(Bundle bundle)
protected override async void OnCreate(Bundle bundle)
{
initFontScale();
@ -75,27 +85,49 @@ namespace TINK.Droid
}
};
await Permissions.RequestAsync<BLEAndLocationPermissions>();
LoadApplication(new App());
}
//Bluetooth Permission on Android 12 "Detect Devices nearby"
// https://stackoverflow.com/questions/71028853/xamarin-forms-ble-plugin-scan-issue-android-12
public class BLEAndLocationPermissions : BasePlatformPermission
{
public override (string androidPermission, bool isRuntime)[] RequiredPermissions => new List<(string androidPermission, bool isRuntime)>
{
(Android.Manifest.Permission.BluetoothScan, true),
(Android.Manifest.Permission.BluetoothConnect, true),
(Android.Manifest.Permission.AccessFineLocation, true)
}.ToArray();
}
/// <summary>
/// Handles opening the dialog to request for permissions.
/// </summary>
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Android.Content.PM.Permission[] grantResults)
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] 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);
}
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
//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

@ -16,7 +16,7 @@
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v12.0</TargetFrameworkVersion>
<AndroidStoreUncompressedFileExtensions />
<MandroidI18n />
<JavaMaximumHeapSize>2G</JavaMaximumHeapSize>
@ -77,7 +77,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="6.0.5" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.0" />
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
<PackageReference Include="MonkeyCache">
<Version>1.6.3</Version>
@ -97,7 +97,7 @@
<Version>6.3.0.19</Version>
</PackageReference>
<PackageReference Include="Serilog">
<Version>2.11.0</Version>
<Version>2.12.0</Version>
</PackageReference>
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
@ -176,21 +176,21 @@
<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.6.0.3</Version>
<Version>1.9.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.MediaRouter">
<Version>1.2.5.2</Version>
<Version>1.3.1.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Palette">
<Version>1.0.0.10</Version>
<Version>1.0.0.15</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.RecyclerView">
<Version>1.2.1.3</Version>
<Version>1.2.1.8</Version>
</PackageReference>
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
<PackageReference Include="Xamarin.Build.Download" Version="0.11.3" />
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>2.0.4</Version>
<Version>2.0.5</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.7.3</Version>
@ -200,13 +200,13 @@
<Version>5.0.0.2515</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps">
<Version>3.3.0</Version>
<Version>5.0.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps.Bindings" Version="3.0.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="117.6.0.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="117.6.0.2" />
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="117.0.1.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="117.2.1.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.1.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="118.1.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.1.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="118.0.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
@ -283,6 +283,9 @@
<ItemGroup>
<AndroidAsset Include="Assets\Open_Red.png" />
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Assets\Location_Pin.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-hdpi\sharee.png" />
</ItemGroup>
@ -458,6 +461,11 @@
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\Location_Button.png">
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
</AndroidResource>
</ItemGroup>
<Import Project="..\TINK\Meinkonrad.projitems" Label="Shared" Condition="Exists('..\TINK\Meinkonrad.projitems')" />
<Import Project="..\..\ShareeSharedGuiLib\ShareeSharedGuiLib.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />

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="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.347" android:versionCode="347">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.350" android:versionCode="350">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
<!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services -->
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
@ -9,13 +9,18 @@
<!-- Access Google based webservices -->
<!-- External storage for caching. -->
<!-- My Location -->
<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_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<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="Meinkonrad" android:allowBackup="false"></application>
<queries>
@ -33,4 +38,4 @@
</intent>
</queries>
<meta-data android:name="com.google.android.geo.API_KEY" android:value="000000000000000000000000000000000000000" />
</manifest>
</manifest>

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,4 +1,4 @@
using Foundation;
using Foundation;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
@ -25,6 +25,9 @@ namespace TINK.iOS
//Color of Icons in Navigation bar (e.g. burger menu and back arrow)
UINavigationBar.Appearance.TintColor = Color.White.ToUIColor();
//Color of Switch
UISwitch.Appearance.OnTintColor = UIColor.LightGray;
new iOS.Device.AppInfo(NSBundle.MainBundle.InfoDictionary[new NSString("CFBundleShortVersionString")]?.ToString() ?? string.Empty);
Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) =>

View file

@ -55,8 +55,8 @@
<key>CFBundleDisplayName</key>
<string>Mein konrad</string>
<key>CFBundleVersion</key>
<string>347</string>
<string>350</string>
<key>CFBundleShortVersionString</key>
<string>3.0.347</string>
<string>3.0.350</string>
</dict>
</plist>

View file

@ -0,0 +1,393 @@
{
"images" : [
{
"filename" : "Location_Button.svg",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal"
},
{
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "3x"
},
{
"idiom" : "iphone"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone"
},
{
"idiom" : "iphone",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "1x"
},
{
"idiom" : "iphone",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "2x"
},
{
"idiom" : "iphone",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "3x"
},
{
"idiom" : "iphone",
"scale" : "1x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "1x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "1x",
"subtype" : "retina4"
},
{
"idiom" : "iphone",
"scale" : "2x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "2x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "2x",
"subtype" : "retina4"
},
{
"idiom" : "iphone",
"scale" : "3x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "3x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "3x",
"subtype" : "retina4"
},
{
"idiom" : "ipad"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "ipad"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "ipad"
},
{
"idiom" : "ipad",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "ipad",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "ipad",
"scale" : "1x"
},
{
"idiom" : "ipad",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "ipad",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "ipad",
"scale" : "2x"
},
{
"idiom" : "car",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "car",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "car",
"scale" : "2x"
},
{
"idiom" : "car",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "car",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "car",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="56.000221"
height="56.000034"
viewBox="0 0 14.816725 14.816675"
version="1.1"
id="svg5"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
sodipodi:docname="Location_Button.svg"
inkscape:export-filename="C:\Users\Anja\Desktop\Location_Button.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.74901961"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="true"
fit-margin-top="5"
fit-margin-left="5"
fit-margin-right="5"
fit-margin-bottom="5"
inkscape:zoom="11.402918"
inkscape:cx="17.407825"
inkscape:cy="24.642815"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g1443"
units="px"
lock-margins="true">
<inkscape:grid
type="xygrid"
id="grid1378"
originx="3.43958"
originy="3.4395888" />
</sodipodi:namedview>
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-43.106273,-79.915487)">
<g
id="g1443">
<ellipse
style="fill:none;fill-opacity:1;stroke:#333333;stroke-width:1.05833;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="path846"
cx="50.523026"
cy="87.332237"
inkscape:export-filename="C:\Users\Anja\Desktop\Location_Pin.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
rx="3.9684811"
ry="3.9684813" />
<circle
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.61265;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="path1042"
cx="50.534115"
cy="87.326935"
r="1.5875" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35094;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296"
width="1.0583333"
height="2.6458333"
x="49.985435"
y="81.238403" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35094;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296-9"
width="1.0583333"
height="2.6458333"
x="49.985435"
y="90.763412" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35093;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296-0"
width="1.0583172"
height="2.6458309"
x="86.794319"
y="-56.600288"
transform="matrix(-2.3780451e-6,1,-1,-6.0876213e-6,0,0)" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35093;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296-0-8"
width="1.0583172"
height="2.6458309"
x="86.794388"
y="-47.07523"
transform="matrix(-2.3780451e-6,1,-1,-6.0876213e-6,0,0)" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -0,0 +1,354 @@
{
"images": [
{
"appearances": [],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [],
"idiom": "iphone"
},
{
"appearances": [],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [],
"scale": "2x",
"idiom": "iphone",
"subtype": "retina4"
},
{
"appearances": [],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [],
"idiom": "ipad"
},
{
"appearances": [],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [],
"scale": "3x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "iphone",
"subtype": "retina4"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "iphone",
"subtype": "retina4"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "car"
},
{
"appearances": [],
"idiom": "universal",
"filename": "Location_Pin.pdf"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}

View file

@ -0,0 +1,70 @@
%PDF-1.5
%µí®û
4 0 obj
<< /Length 5 0 R
/Filter /FlateDecode
>>
stream
xœÕ<EFBFBD>A
1 E÷9Å¿€1iÆNçàbt).dÄÁÅèÂëjg@=<3D> ýä“ßGª¯™ºTÊ!˜iDw¥<77>¹6KÌþN­ü^h·‡°àHÖ /Ö[a)ó„£®(Þ„­õ#R\N©.ž0½ƒ<>·%3F'Ftá}Ñ&ÆùgÃ-ZòåÙbŠ¡ö¦ºˆ n=þï3'jé Õ[ƒ
endstream
endobj
5 0 obj
165
endobj
3 0 obj
<<
/ExtGState <<
/a0 << /CA 1 /ca 1 >>
>>
>>
endobj
2 0 obj
<< /Type /Page % 1
/Parent 1 0 R
/MediaBox [ 0 0 41.223316 41.223316 ]
/Contents 4 0 R
/Group <<
/Type /Group
/S /Transparency
/I true
/CS /DeviceRGB
>>
/Resources 3 0 R
>>
endobj
1 0 obj
<< /Type /Pages
/Kids [ 2 0 R ]
/Count 1
>>
endobj
6 0 obj
<< /Producer (cairo 1.17.4 (https://cairographics.org))
/Creator <FEFF0049006E006B0073006300610070006500200031002E0031002E00320020002800680074007400700073003A002F002F0069006E006B00730063006100700065002E006F007200670029>
/CreationDate (D:20221116092441+01'00)
>>
endobj
7 0 obj
<< /Type /Catalog
/Pages 1 0 R
>>
endobj
xref
0 8
0000000000 65535 f
0000000581 00000 n
0000000351 00000 n
0000000279 00000 n
0000000015 00000 n
0000000257 00000 n
0000000646 00000 n
0000000929 00000 n
trailer
<< /Size 8
/Root 7 0 R
/Info 6 0 R
>>
startxref
981
%%EOF

View file

@ -317,6 +317,18 @@
</ImageAsset>
<ImageAsset Include="Media.xcassets\Open_Red.imageset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Pin.imageset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Pin.imageset\Location_Pin.pdf">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Button.imageset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Button.imageset\Location_Button.svg">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\swk_theme.imageset\swk_theme.pdf">
<Visible>false</Visible>
@ -537,6 +549,8 @@
<Folder Include="Media.xcassets\Open_Green.imageset\" />
<Folder Include="Media.xcassets\Open_LightBlue.imageset\" />
<Folder Include="Media.xcassets\Open_Red.imageset\" />
<Folder Include="Media.xcassets\Location_Pin.imageset\" />
<Folder Include="Media.xcassets\Location_Button.imageset\" />
<Folder Include="Media.xcassets\sharee_no_background.imageset\" />
<Folder Include="Media.xcassets\swk_theme.imageset\" />
</ItemGroup>

View file

@ -22,6 +22,11 @@
<x:String x:Key="IconInfo">&#xf05a;</x:String>
<!--<x:String x:Key="IconClose">&#xf00d;</x:String>-->
<x:String x:Key="IconClose">&#xf410;</x:String>
<!--TogglePasswortEntry-->
<x:String x:Key="EyeOpen">&#xf06e;</x:String>
<x:String x:Key="EyeClose">&#xf070;</x:String>
<!-- Add more resources here -->
<ResourceDictionary.MergedDictionaries>
<!-- Add more resource dictionaries here -->

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

View file

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
x:Class="TINK.View.Login.LoginPage">
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
x:Class="TINK.View.Login.LoginPage">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
@ -44,13 +45,14 @@
</DataTrigger>
</Label.Triggers>
</Label>
<Entry Placeholder="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
AutomationId="password_text"
IsPassword="true"
x:Name="PasswordEntry"
Text="{Binding Password}"
IsEnabled="{Binding IsLoggedOut}"/>
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordLabel}"
<sharedGui:TogglePasswordEntry
Placeholder="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
Text="{Binding Password}"
HidePassword="True"
AutomationId="password_text"
x:Name="PasswordEntry"
IsEnabled="{Binding IsLoggedOut}"/>
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordLabel}"
HorizontalOptions="End"
Margin="0,-10,0,5"
FontSize="Small">
@ -96,4 +98,4 @@
</StackLayout>
</Frame>
</ScrollView>
</ContentPage>
</ContentPage>

View file

@ -90,6 +90,24 @@
</StackLayout>
</Frame>
<!--Center to currentLocation Button-->
<ImageButton
Grid.Row="2"
Grid.ColumnSpan="3"
x:Name="CurrentLocation"
AutomationId ="currentLocaton_button"
Command="{Binding OnCurrentLocationButtonClicked}"
IsVisible="True"
BackgroundColor="Transparent"
VerticalOptions="End"
HorizontalOptions="End"
Margin="0,0,11,100"
Source="Location_Button.png"
WidthRequest="40"
HeightRequest="40"
CornerRadius="20">
</ImageButton>
<!--While process is running-->
<!--Spinner-->
<ActivityIndicator

View file

@ -36,6 +36,10 @@
<Compile Include="$(MSBuildThisFileDirectory)View\VersionNumberView.xaml.cs">
<DependentUpon>VersionNumberView.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\TogglePasswordEntry.xaml.cs">
<DependentUpon>TogglePasswordEntry.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\BarLevelInputView.xaml">
@ -48,4 +52,10 @@
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\TogglePasswordEntry.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
</Project>

View file

@ -0,0 +1,45 @@
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShareeSharedGuiLib.View.TogglePasswordEntry"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
x:Name="root">
<ContentView.Content>
<Grid BindingContext="{x:Reference root}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="20"/>
</Grid.ColumnDefinitions>
<Entry Placeholder="{Binding Placeholder}"
IsPassword="{Binding HidePassword}"
Text="{Binding Text}"/>
<ImageButton Clicked="OnImageButtonClicked"
BackgroundColor="Transparent"
Grid.Column="1">
<ImageButton.Triggers>
<DataTrigger TargetType="ImageButton"
Binding="{Binding HidePassword}"
Value="True">
<Setter Property="Source">
<Setter.Value>
<FontImageSource Glyph="{StaticResource EyeOpen}"
Color="{Binding HidePasswordColor}"
FontFamily="FA-S" />
</Setter.Value>
</Setter>
</DataTrigger>
<DataTrigger TargetType="ImageButton"
Binding="{Binding HidePassword}"
Value="False">
<Setter Property="Source">
<Setter.Value>
<FontImageSource Glyph="{StaticResource EyeClose}"
Color="{Binding HidePasswordColor}"
FontFamily="FA-S" />
</Setter.Value>
</Setter>
</DataTrigger>
</ImageButton.Triggers>
</ImageButton>
</Grid>
</ContentView.Content>
</ContentView>

View file

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace ShareeSharedGuiLib.View
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class TogglePasswordEntry : ContentView
{
public static readonly BindableProperty PlaceholderProperty =
BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(TogglePasswordEntry));
public static readonly BindableProperty TextProperty =
BindableProperty.Create(nameof(Text), typeof(string), typeof(TogglePasswordEntry),
defaultBindingMode: BindingMode.TwoWay);
public static readonly BindableProperty HidePasswordProperty =
BindableProperty.Create(nameof(HidePassword), typeof(bool), typeof(TogglePasswordEntry),
defaultValue: true);
public static readonly BindableProperty HidePasswordColorProperty =
BindableProperty.Create(nameof(HidePasswordColor), typeof(Color), typeof(TogglePasswordEntry),
defaultValue: Color.DimGray);
public string Placeholder
{
get => (string)GetValue(PlaceholderProperty);
set => SetValue(PlaceholderProperty, value);
}
public string Text
{
get => (string)GetValue(TextProperty);
set => SetValue(TextProperty, value);
}
public bool HidePassword
{
get => (bool)GetValue(HidePasswordProperty);
set => SetValue(HidePasswordProperty, value);
}
public Color HidePasswordColor
{
get => (Color)GetValue(HidePasswordColorProperty);
set => SetValue(HidePasswordColorProperty, value);
}
public TogglePasswordEntry()
{
InitializeComponent();
}
private void OnImageButtonClicked(object sender, EventArgs e)
{
HidePassword = !HidePassword;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using Android.App;
using Android.Content;
using Android.Content.PM;
@ -7,12 +8,21 @@ using Android.OS;
using Android.Util;
using Firebase;
using Java.Interop;
using Java.Security.Acl;
using Plugin.Permissions;
using Xamarin.Forms.Platform.Android.AppLinks;
using static Xamarin.Essentials.Permissions;
using Xamarin.Essentials;
using Android.Runtime;
namespace TINK.Droid
{
[Activity(Label = "Sharee", Icon = "@drawable/sharee", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[Activity(
Label = "Sharee",
Icon = "@drawable/sharee",
Theme = "@style/MainTheme",
MainLauncher = true,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.ActionView, Intent.CategoryBrowsable, Intent.CategoryDefault },
@ -40,7 +50,7 @@ namespace TINK.Droid
metrics.ScaledDensity = configuration.FontScale * metrics.Density;
BaseContext.Resources.UpdateConfiguration(configuration, metrics);
}
protected override void OnCreate(Bundle bundle)
protected override async void OnCreate(Bundle bundle)
{
initFontScale();
@ -75,27 +85,49 @@ namespace TINK.Droid
}
};
await Permissions.RequestAsync<BLEAndLocationPermissions>();
LoadApplication(new App());
}
//Bluetooth Permission on Android 12 "Detect Devices nearby"
// https://stackoverflow.com/questions/71028853/xamarin-forms-ble-plugin-scan-issue-android-12
public class BLEAndLocationPermissions : BasePlatformPermission
{
public override (string androidPermission, bool isRuntime)[] RequiredPermissions => new List<(string androidPermission, bool isRuntime)>
{
(Android.Manifest.Permission.BluetoothScan, true),
(Android.Manifest.Permission.BluetoothConnect, true),
(Android.Manifest.Permission.AccessFineLocation, true)
}.ToArray();
}
/// <summary>
/// Handles opening the dialog to request for permissions.
/// </summary>
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Android.Content.PM.Permission[] grantResults)
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] 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);
}
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
//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="internalOnly" package="com.hauffware.sharee" android:versionName="3.0.347" android:versionCode="347">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.hauffware.sharee" android:versionName="3.0.350" android:versionCode="350">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
<!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services -->
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
@ -9,13 +9,18 @@
<!-- Access Google based webservices -->
<!-- External storage for caching. -->
<!-- My Location -->
<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_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<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>
<queries>
@ -33,4 +38,4 @@
</intent>
</queries>
<meta-data android:name="com.google.android.geo.API_KEY" android:value="000000000000000000000000000000000000000" />
</manifest>
</manifest>

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

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>v12.0</TargetFrameworkVersion>
<AndroidStoreUncompressedFileExtensions />
<MandroidI18n />
<JavaMaximumHeapSize>2G</JavaMaximumHeapSize>
@ -77,7 +77,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="6.0.5" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.0" />
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
<PackageReference Include="MonkeyCache">
<Version>1.6.3</Version>
@ -97,7 +97,7 @@
<Version>6.3.0.19</Version>
</PackageReference>
<PackageReference Include="Serilog">
<Version>2.11.0</Version>
<Version>2.12.0</Version>
</PackageReference>
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
@ -176,21 +176,21 @@
<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.6.0.3</Version>
<Version>1.9.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.MediaRouter">
<Version>1.2.5.2</Version>
<Version>1.3.1.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Palette">
<Version>1.0.0.10</Version>
<Version>1.0.0.15</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.RecyclerView">
<Version>1.2.1.3</Version>
<Version>1.2.1.8</Version>
</PackageReference>
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
<PackageReference Include="Xamarin.Build.Download" Version="0.11.3" />
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>2.0.4</Version>
<Version>2.0.5</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials">
<Version>1.7.3</Version>
@ -200,13 +200,13 @@
<Version>5.0.0.2515</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps">
<Version>3.3.0</Version>
<Version>5.0.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.GoogleMaps.Bindings" Version="3.0.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="117.6.0.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="117.6.0.2" />
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="117.0.1.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="117.2.1.1" />
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.1.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="118.1.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.1.0" />
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="118.0.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
@ -240,6 +240,10 @@
<EmbeddedResource Include="Resources\Font Awesome 5 Free-Solid-900.otf" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\Location_Button.png">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateGeneratedFiles</Generator>
</AndroidResource>
<AndroidResource Include="Resources\layout\Tabbar.axml" />
<AndroidResource Include="Resources\layout\Toolbar.axml" />
<AndroidResource Include="Resources\values\styles.xml">
@ -272,6 +276,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Assets\Location_Pin.png" />
<AndroidAsset Include="Assets\Open_Blue.png" />
</ItemGroup>
<ItemGroup>

View file

@ -1,4 +1,4 @@
using Foundation;
using Foundation;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
@ -25,6 +25,9 @@ namespace TINK.iOS
//Color of Icons in Navigation bar (e.g. burger menu and back arrow)
UINavigationBar.Appearance.TintColor = Color.White.ToUIColor();
//Color of Switch
UISwitch.Appearance.OnTintColor = UIColor.LightGray;
new iOS.Device.AppInfo(NSBundle.MainBundle.InfoDictionary[new NSString("CFBundleShortVersionString")]?.ToString() ?? string.Empty);
Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) =>

View file

@ -55,8 +55,8 @@
<key>CFBundleDisplayName</key>
<string>sharee.bike</string>
<key>CFBundleVersion</key>
<string>347</string>
<string>350</string>
<key>CFBundleShortVersionString</key>
<string>3.0.347</string>
<string>3.0.350</string>
</dict>
</plist>

View file

@ -0,0 +1,393 @@
{
"images" : [
{
"filename" : "Location_Button.svg",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal"
},
{
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"scale" : "3x"
},
{
"idiom" : "iphone"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone"
},
{
"idiom" : "iphone",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "1x"
},
{
"idiom" : "iphone",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "2x"
},
{
"idiom" : "iphone",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "3x"
},
{
"idiom" : "iphone",
"scale" : "1x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "1x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "1x",
"subtype" : "retina4"
},
{
"idiom" : "iphone",
"scale" : "2x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "2x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "2x",
"subtype" : "retina4"
},
{
"idiom" : "iphone",
"scale" : "3x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "iphone",
"scale" : "3x",
"subtype" : "retina4"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "iphone",
"scale" : "3x",
"subtype" : "retina4"
},
{
"idiom" : "ipad"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "ipad"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "ipad"
},
{
"idiom" : "ipad",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "ipad",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "ipad",
"scale" : "1x"
},
{
"idiom" : "ipad",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "ipad",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "ipad",
"scale" : "2x"
},
{
"idiom" : "car",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "car",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "car",
"scale" : "2x"
},
{
"idiom" : "car",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "light"
}
],
"idiom" : "car",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "car",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="56.000221"
height="56.000034"
viewBox="0 0 14.816725 14.816675"
version="1.1"
id="svg5"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
sodipodi:docname="Location_Button.svg"
inkscape:export-filename="C:\Users\Anja\Desktop\Location_Button.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.74901961"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="true"
fit-margin-top="5"
fit-margin-left="5"
fit-margin-right="5"
fit-margin-bottom="5"
inkscape:zoom="11.402918"
inkscape:cx="17.407825"
inkscape:cy="24.642815"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g1443"
units="px"
lock-margins="true">
<inkscape:grid
type="xygrid"
id="grid1378"
originx="3.43958"
originy="3.4395888" />
</sodipodi:namedview>
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-43.106273,-79.915487)">
<g
id="g1443">
<ellipse
style="fill:none;fill-opacity:1;stroke:#333333;stroke-width:1.05833;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="path846"
cx="50.523026"
cy="87.332237"
inkscape:export-filename="C:\Users\Anja\Desktop\Location_Pin.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
rx="3.9684811"
ry="3.9684813" />
<circle
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.61265;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="path1042"
cx="50.534115"
cy="87.326935"
r="1.5875" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35094;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296"
width="1.0583333"
height="2.6458333"
x="49.985435"
y="81.238403" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35094;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296-9"
width="1.0583333"
height="2.6458333"
x="49.985435"
y="90.763412" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35093;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296-0"
width="1.0583172"
height="2.6458309"
x="86.794319"
y="-56.600288"
transform="matrix(-2.3780451e-6,1,-1,-6.0876213e-6,0,0)" />
<rect
style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.35093;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1296-0-8"
width="1.0583172"
height="2.6458309"
x="86.794388"
y="-47.07523"
transform="matrix(-2.3780451e-6,1,-1,-6.0876213e-6,0,0)" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4 KiB

View file

@ -0,0 +1,354 @@
{
"images": [
{
"appearances": [],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [],
"idiom": "iphone"
},
{
"appearances": [],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [],
"scale": "2x",
"idiom": "iphone",
"subtype": "retina4"
},
{
"appearances": [],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [],
"idiom": "ipad"
},
{
"appearances": [],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [],
"scale": "3x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "iphone",
"subtype": "retina4"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"scale": "3x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "iphone",
"subtype": "retina4"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "iphone"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "1x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "ipad"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "2x",
"idiom": "car"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "light"
}
],
"scale": "3x",
"idiom": "car"
},
{
"appearances": [],
"idiom": "universal",
"filename": "Location_Pin.pdf"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}

View file

@ -0,0 +1,70 @@
%PDF-1.5
%µí®û
4 0 obj
<< /Length 5 0 R
/Filter /FlateDecode
>>
stream
xœÕ<EFBFBD>A
1 E÷9Å¿€1iÆNçàbt).dÄÁÅèÂëjg@=<3D> ýä“ßGª¯™ºTÊ!˜iDw¥<77>¹6KÌþN­ü^h·‡°àHÖ /Ö[a)ó„£®(Þ„­õ#R\N©.ž0½ƒ<>·%3F'Ftá}Ñ&ÆùgÃ-ZòåÙbŠ¡ö¦ºˆ n=þï3'jé Õ[ƒ
endstream
endobj
5 0 obj
165
endobj
3 0 obj
<<
/ExtGState <<
/a0 << /CA 1 /ca 1 >>
>>
>>
endobj
2 0 obj
<< /Type /Page % 1
/Parent 1 0 R
/MediaBox [ 0 0 41.223316 41.223316 ]
/Contents 4 0 R
/Group <<
/Type /Group
/S /Transparency
/I true
/CS /DeviceRGB
>>
/Resources 3 0 R
>>
endobj
1 0 obj
<< /Type /Pages
/Kids [ 2 0 R ]
/Count 1
>>
endobj
6 0 obj
<< /Producer (cairo 1.17.4 (https://cairographics.org))
/Creator <FEFF0049006E006B0073006300610070006500200031002E0031002E00320020002800680074007400700073003A002F002F0069006E006B00730063006100700065002E006F007200670029>
/CreationDate (D:20221116092441+01'00)
>>
endobj
7 0 obj
<< /Type /Catalog
/Pages 1 0 R
>>
endobj
xref
0 8
0000000000 65535 f
0000000581 00000 n
0000000351 00000 n
0000000279 00000 n
0000000015 00000 n
0000000257 00000 n
0000000646 00000 n
0000000929 00000 n
trailer
<< /Size 8
/Root 7 0 R
/Info 6 0 R
>>
startxref
981
%%EOF

View file

@ -373,6 +373,18 @@
</ImageAsset>
<ImageAsset Include="Media.xcassets\Open_Red.imageset\StationMarkerOpenRed.pdf">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Pin.imageset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Pin.imageset\Location_Pin.pdf">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Button.imageset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\Location_Button.imageset\Location_Button.svg">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Media.xcassets\AppIcons.appiconset\1024-1.png">
<Visible>false</Visible>
@ -466,6 +478,8 @@
<Folder Include="Media.xcassets\Open_Green.imageset\" />
<Folder Include="Media.xcassets\Open_LightBlue.imageset\" />
<Folder Include="Media.xcassets\Open_Red.imageset\" />
<Folder Include="Media.xcassets\Location_Pin.imageset\" />
<Folder Include="Media.xcassets\Location_Button.imageset\" />
<Folder Include="Media.xcassets\sharee_no_background.imageset\" />
</ItemGroup>
<Import Project="..\TINK\TINK.projitems" Label="Shared" Condition="Exists('..\TINK\TINK.projitems')" />

View file

@ -22,7 +22,12 @@
<x:String x:Key="IconInfo">&#xf05a;</x:String>
<!--<x:String x:Key="IconClose">&#xf00d;</x:String>-->
<x:String x:Key="IconClose">&#xf410;</x:String>
<!-- Add more resources here -->
<!--TogglePasswortEntry-->
<x:String x:Key="EyeOpen">&#xf06e;</x:String>
<x:String x:Key="EyeClose">&#xf070;</x:String>
<!-- Add more resources here -->
<ResourceDictionary.MergedDictionaries>
<!-- Add more resource dictionaries here -->
<themes:ShareeBike/>

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

View file

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
x:Class="TINK.View.Login.LoginPage">
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
x:Class="TINK.View.Login.LoginPage">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Label Style="{StaticResource Label-Navbar}"
@ -32,24 +33,25 @@
x:Name="EMailEntry"
Text="{Binding MailAddress}"
IsEnabled="{Binding IsLoggedOut}"/>
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
Margin="0,0,0,-10">
<Label.Triggers>
<DataTrigger
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding Source={x:Reference PasswordEntry}, Path=Text, TargetNullValue=''}"
Value="">
<Setter Property="IsVisible" Value="False" />
</DataTrigger>
</Label.Triggers>
</Label>
<Entry Placeholder="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
AutomationId="password_text"
IsPassword="true"
x:Name="PasswordEntry"
Text="{Binding Password}"
IsEnabled="{Binding IsLoggedOut}"/>
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordLabel}"
<Setter Property="IsVisible" Value="False" />
</DataTrigger>
</Label.Triggers>
</Label>
<sharedGui:TogglePasswordEntry
Placeholder="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
Text="{Binding Password}"
HidePassword="True"
AutomationId="password_text"
x:Name="PasswordEntry"
IsEnabled="{Binding IsLoggedOut}"/>
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordLabel}"
HorizontalOptions="End"
Margin="0,-10,0,5"
FontSize="Small">
@ -95,4 +97,4 @@
</StackLayout>
</Frame>
</ScrollView>
</ContentPage>
</ContentPage>

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Threading.Tasks;
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
using TINK.Model.Device;
@ -120,4 +120,4 @@ namespace TINK.View.Login
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => throw new NotSupportedException();
#endif
}
}
}

View file

@ -89,6 +89,24 @@
</StackLayout>
</Frame>
<!--Center to currentLocation Button-->
<ImageButton
Grid.Row="2"
Grid.ColumnSpan="3"
x:Name="CurrentLocation"
AutomationId ="currentLocaton_button"
Command="{Binding OnCurrentLocationButtonClicked}"
IsVisible="True"
BackgroundColor="Transparent"
VerticalOptions="End"
HorizontalOptions="End"
Margin="0,0,11,100"
Source="Location_Button.png"
WidthRequest="40"
HeightRequest="40"
CornerRadius="20">
</ImageButton>
<!--While process is running-->
<!--Spinner-->
<ActivityIndicator

View file

@ -625,6 +625,23 @@ namespace TINK.Model
AppResources.ChangeLog_3_0_347_SB,
new List<AppFlavor> { AppFlavor.ShareeBike }
},
{
new Version(3, 0, 348),
AppResources.ChangeLog_3_0_348,
new List<AppFlavor> { AppFlavor.LastenradBayern, AppFlavor.MeinKonrad, AppFlavor.ShareeBike },
new List<DevicePlatform> { DevicePlatform.Android }
},
{
new Version(3, 0, 349),
AppResources.ChangeLog_3_0_349,
new List<AppFlavor> { AppFlavor.LastenradBayern, AppFlavor.MeinKonrad, AppFlavor.ShareeBike },
new List<DevicePlatform> { DevicePlatform.Android }
},
{
new Version(3, 0, 350),
AppResources.ChangeLog_3_0_350_SB_MK,
new List<AppFlavor> { AppFlavor.MeinKonrad, AppFlavor.ShareeBike }
},
};
/// <summary> Manges the whats new information.</summary>

View file

@ -694,6 +694,37 @@ namespace TINK.MultilingualResources {
}
}
/// <summary>
/// Looks up a localized string similar to App ugraded to target api level 31 (Android 12)..
/// </summary>
public static string ChangeLog_3_0_348 {
get {
return ResourceManager.GetString("ChangeLog_3_0_348", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The permission query for Location and Detect Nearby Devices has been adapted to Android 12. Please allow both to rent our bikes without any problems..
/// </summary>
public static string ChangeLog_3_0_349 {
get {
return ResourceManager.GetString("ChangeLog_3_0_349", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Your current position will now be displayed on the map as a blue dot, provided you turn on your location service. &lt;br/&gt;
///&lt;br/&gt;
///When logging in, you can now view the password you entered. &lt;br/&gt;
///&lt;br/&gt;
///Try it out!.
/// </summary>
public static string ChangeLog_3_0_350_SB_MK {
get {
return ResourceManager.GetString("ChangeLog_3_0_350_SB_MK", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to We have fixed some bugs. Enjoy the ride!.
/// </summary>

View file

@ -1085,4 +1085,17 @@ Einstellung hinzugefügt mit der festgelegt werden kann, ob die App mit der Seit
gestartet wird.&lt;br/&gt;
Kleinere Verbesserungen.&lt;br/&gt;</value>
</data>
<data name="ChangeLog_3_0_348" xml:space="preserve">
<value>App aktualisiert auf Ziel Api-Level 31 (Android 12).</value>
</data>
<data name="ChangeLog_3_0_349" xml:space="preserve">
<value>Die Berechtigungs-Abfrage für Standort und Geräte in der Nähe wurde an Android 12 angepasst. Bitte lassen Sie beides zu, um unsere Räder problemlos mieten zu können.</value>
</data>
<data name="ChangeLog_3_0_350_SB_MK" xml:space="preserve">
<value>Ihre aktuelle Position wird nun auf der Karte als blauer Punkt angezeigt. Schalten Sie dazu Ihren Standortdienst ein. &lt;br/&gt;
&lt;br/&gt;
Beim Login können Sie nun Ihr eingegebenes Passwort einsehen.&lt;br/&gt;
&lt;br/&gt;
Probieren Sie es aus!</value>
</data>
</root>

View file

@ -1175,4 +1175,17 @@ Minor improvements.&lt;br/&gt;</value>
<data name="ErrorNotConnectedToNetwork" xml:space="preserve">
<value>Not connected to network.</value>
</data>
</root>
<data name="ChangeLog_3_0_348" xml:space="preserve">
<value>App ugraded to target api level 31 (Android 12).</value>
</data>
<data name="ChangeLog_3_0_349" xml:space="preserve">
<value>The permission query for Location and Detect Nearby Devices has been adapted to Android 12. Please allow both to rent our bikes without any problems.</value>
</data>
<data name="ChangeLog_3_0_350_SB_MK" xml:space="preserve">
<value>Your current position will now be displayed on the map as a blue dot, provided you turn on your location service. &lt;br/&gt;
&lt;br/&gt;
When logging in, you can now view the password you entered. &lt;br/&gt;
&lt;br/&gt;
Try it out!</value>
</data>
</root>

View file

@ -1480,6 +1480,26 @@ Einstellung hinzugefügt mit der festgelegt werden kann, ob die App mit der Seit
gestartet wird.&lt;br/&gt;
Kleinere Verbesserungen.&lt;br/&gt;</target>
</trans-unit>
<trans-unit id="ChangeLog_3_0_348" translate="yes" xml:space="preserve">
<source>App ugraded to target api level 31 (Android 12).</source>
<target state="translated">App aktualisiert auf Ziel Api-Level 31 (Android 12).</target>
</trans-unit>
<trans-unit id="ChangeLog_3_0_349" translate="yes" xml:space="preserve">
<source>The permission query for Location and Detect Nearby Devices has been adapted to Android 12. Please allow both to rent our bikes without any problems.</source>
<target state="translated">Die Berechtigungs-Abfrage für Standort und Geräte in der Nähe wurde an Android 12 angepasst. Bitte lassen Sie beides zu, um unsere Räder problemlos mieten zu können.</target>
</trans-unit>
<trans-unit id="ChangeLog_3_0_350_SB_MK" translate="yes" xml:space="preserve">
<source>Your current position will now be displayed on the map as a blue dot, provided you turn on your location service. &lt;br/&gt;
&lt;br/&gt;
When logging in, you can now view the password you entered. &lt;br/&gt;
&lt;br/&gt;
Try it out!</source>
<target state="translated">Ihre aktuelle Position wird nun auf der Karte als blauer Punkt angezeigt. Schalten Sie dazu Ihren Standortdienst ein. &lt;br/&gt;
&lt;br/&gt;
Beim Login können Sie nun Ihr eingegebenes Passwort einsehen.&lt;br/&gt;
&lt;br/&gt;
Probieren Sie es aus!</target>
</trans-unit>
</group>
</body>
</file>

View file

@ -30,7 +30,7 @@
<PackageReference Include="Plugin.BLE" Version="2.1.3" />
<PackageReference Include="Plugin.BluetoothLE" Version="6.3.0.19" />
<PackageReference Include="Plugin.Permissions" Version="6.0.1" />
<PackageReference Include="Serilog" Version="2.11.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="System.Collections" Version="4.3.0" />

View file

@ -1,4 +1,4 @@
using Xamarin.Forms;
using Xamarin.Forms;
using TINK.View;
using TINK.Model.Station;
using System;
@ -22,6 +22,7 @@ using TINK.MultilingualResources;
using TINK.Repository;
using TINK.Services.Geolocation;
using TINK.Model.State;
using TINK.ViewModel.Map;
namespace TINK.ViewModel.Contact
{
@ -161,7 +162,7 @@ namespace TINK.ViewModel.Contact
/// <summary>
/// One time setup: Sets pins into map and connects to events.
/// </summary>
private void InitializePins(StationDictionary stations)
private async void InitializePins(StationDictionary stations)
{
// Add pins to stations.
Log.ForContext<SelectStationPageViewModel>().Debug($"Request to draw {stations.Count} pins.");
@ -188,8 +189,35 @@ namespace TINK.ViewModel.Contact
Pins.Add(l_oPin);
}
//Add blue dot for showing current location of user
Location currentLocation = null;
try
{
currentLocation = await GeolocationService.GetAsync();
}
catch (Exception ex)
{
Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
}
if (currentLocation != null)
{
var currentLocationPin = new Pin()
{
Position = new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
Label = "currentLocationPin",
Type = PinType.Place,
Tag = "NotClickable",
Icon = BitmapDescriptorFactory.FromBundle(currentLocationPinName)
};
Pins.Add(currentLocationPin);
}
}
public string currentLocationPinName = $"Location_Pin{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}";
/// <summary> Update all stations from TINK. </summary>
/// <param name="stationsColorList">List of colors to apply.</param>
private void UpdatePinsColor(IList<Color> stationsColorList)
@ -199,24 +227,30 @@ namespace TINK.ViewModel.Contact
// Update colors of pins.
for (int pinIndex = 0; pinIndex < stationsColorList.Count; pinIndex++)
{
var indexPartPrefix = int.TryParse(Pins[pinIndex].Tag.ToString(), out int stationId)
&& stationId <= CUSTOM_ICONS_COUNT
? $"{stationId}" // there is a station marker with index letter for given station id
: "Open"; // there is no station marker. Use open marker.
var colorPartPrefix = GetRessourceNameColorPart(stationsColorList[pinIndex]);
var l_iName = $"{indexPartPrefix.ToString().PadLeft(2, '0')}_{colorPartPrefix}{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}";
try
if (Pins[pinIndex].Tag.ToString() == "NotClickable")
{
Pins[pinIndex].Icon = BitmapDescriptorFactory.FromBundle(l_iName);
Pins[pinIndex].Icon = BitmapDescriptorFactory.FromBundle(currentLocationPinName);
}
catch (Exception l_oException)
else
{
Log.ForContext<SelectStationPageViewModel>().Error("Station icon {l_strName} can not be loaded. {@l_oException}.", l_oException);
Pins[pinIndex].Label = stationId.ToString();
Pins[pinIndex].Icon = BitmapDescriptorFactory.DefaultMarker(stationsColorList[pinIndex]);
var indexPartPrefix = int.TryParse(Pins[pinIndex].Tag.ToString(), out int stationId)
&& stationId <= CUSTOM_ICONS_COUNT
? $"{stationId}" // there is a station marker with index letter for given station id
: "Open"; // there is no station marker. Use open marker.
var colorPartPrefix = GetRessourceNameColorPart(stationsColorList[pinIndex]);
var l_iName = $"{indexPartPrefix.ToString().PadLeft(2, '0')}_{colorPartPrefix}{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}";
try
{
Pins[pinIndex].Icon = BitmapDescriptorFactory.FromBundle(l_iName);
}
catch (Exception l_oException)
{
Log.ForContext<SelectStationPageViewModel>().Error("Station icon {l_strName} can not be loaded. {@l_oException}.", l_oException);
Pins[pinIndex].Label = stationId.ToString();
Pins[pinIndex].Icon = BitmapDescriptorFactory.DefaultMarker(stationsColorList[pinIndex]);
}
}
Pins[pinIndex].IsVisible = true;
@ -449,14 +483,18 @@ namespace TINK.ViewModel.Contact
/// <param name="selectedStationId">Id of station user clicked on.</param>
public async void OnStationClicked(string selectedStationId)
{
try
//Make shure currentLocationPin can not be clicked
if (selectedStationId != "NotClickable")
{
Log.ForContext<SelectStationPageViewModel>().Information($"User taped station {selectedStationId}.");
try
{
Log.ForContext<SelectStationPageViewModel>().Information($"User taped station {selectedStationId}.");
// Lock action to prevent multiple instances of "BikeAtStation" being opened.
IsMapPageEnabled = false;
TinkApp.SelectedStation = TinkApp.Stations.FirstOrDefault(x => x.Id == selectedStationId)
// Lock action to prevent multiple instances of "BikeAtStation" being opened.
IsMapPageEnabled = false;
TinkApp.SelectedStation = TinkApp.Stations.FirstOrDefault(x => x.Id == selectedStationId)
?? new Station(selectedStationId, new List<string>(), null); // Station might not be in list StationDictinaly because this list is not updatd in background task.
#if TRYNOTBACKSTYLE
@ -468,23 +506,28 @@ namespace TINK.ViewModel.Contact
// Show page.
ViewService.ShowPage(ViewTypes.ContactPage, AppResources.MarkingContactPageTitle);
#else
await ViewService.ShowPage("//ContactPage");
await ViewService.ShowPage("//ContactPage");
#endif
IsMapPageEnabled = true;
ActionText = "";
}
catch (Exception exception)
{
IsMapPageEnabled = true;
ActionText = "";
IsMapPageEnabled = true;
ActionText = "";
}
catch (Exception exception)
{
IsMapPageEnabled = true;
ActionText = "";
Log.ForContext<SelectStationPageViewModel>().Error("Fehler beim Öffnen der Ansicht \"Fahrräder an Station\" aufgetreten. {Exception}", exception);
await ViewService.DisplayAlert(
"Fehler",
$"Fehler beim Öffnen der Ansicht \"Fahrräder an Station\" aufgetreten. {exception.Message}",
"OK");
}
Log.ForContext<SelectStationPageViewModel>().Error("Fehler beim Öffnen der Ansicht \"Fahrräder an Station\" aufgetreten. {Exception}", exception);
await ViewService.DisplayAlert(
"Fehler",
$"Fehler beim Öffnen der Ansicht \"Fahrräder an Station\" aufgetreten. {exception.Message}",
"OK");
}
#endif
}
else
{
return;
}
}
/// <summary>
@ -513,23 +556,26 @@ namespace TINK.ViewModel.Contact
var colors = new List<Color>();
foreach (var stationId in stationsId)
{
// Get color of given station.
var bikesAtStation = bikesAll.Where(x => x.StationId == stationId).ToList();
if (bikesAtStation.FirstOrDefault(x => x.State.Value.IsOccupied()) != null)
if (stationId != "NotClickable")
{
// There is at least one requested or booked bike
colors.Add(Color.LightBlue);
continue;
}
// Get color of given station.
var bikesAtStation = bikesAll.Where(x => x.StationId == stationId).ToList();
if (bikesAtStation.FirstOrDefault(x => x.State.Value.IsOccupied()) != null)
{
// There is at least one requested or booked bike
colors.Add(Color.LightBlue);
continue;
}
if (bikesAtStation.ToList().Count > 0)
{
// There is at least one bike available
colors.Add(Color.Green);
continue;
}
if (bikesAtStation.ToList().Count > 0)
{
// There is at least one bike available
colors.Add(Color.Green);
continue;
}
colors.Add(Color.Red);
colors.Add(Color.Red);
}
}
return colors;

View file

@ -198,7 +198,7 @@ namespace TINK.ViewModel.Map
/// <summary>
/// One time setup: Sets pins into map and connects to events.
/// </summary>
private void InitializePins(StationDictionary stations)
public async void InitializePins(StationDictionary stations)
{
// Add pins to stations.
Log.ForContext<MapPageViewModel>().Debug($"Request to draw {stations.Count} pins.");
@ -225,8 +225,35 @@ namespace TINK.ViewModel.Map
Pins.Add(pin);
}
//Add blue dot for showing current location of user
Location currentLocation = null;
try
{
currentLocation = await GeolocationService.GetAsync();
}
catch (Exception ex)
{
Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
}
if (currentLocation != null)
{
var currentLocationPin = new Pin()
{
Position = new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
Label = "currentLocationPin",
Type = PinType.Place,
Tag = "NotClickable",
Icon = BitmapDescriptorFactory.FromBundle(currentLocationPinName)
};
Pins.Add(currentLocationPin);
}
}
public string currentLocationPinName = $"Location_Pin{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}";
/// <summary> Update all stations from TINK. </summary>
/// <param name="stationsColorList">List of colors to apply.</param>
private void UpdatePinsColor(IList<Color> stationsColorList)
@ -236,24 +263,30 @@ namespace TINK.ViewModel.Map
// Update colors of pins.
for (int pinIndex = 0; pinIndex < stationsColorList.Count; pinIndex++)
{
var indexPartPrefix = int.TryParse(Pins[pinIndex].Tag.ToString(), out int stationId)
if (Pins[pinIndex].Tag.ToString() == "NotClickable")
{
Pins[pinIndex].Icon = BitmapDescriptorFactory.FromBundle(currentLocationPinName);
}
else
{
var indexPartPrefix = int.TryParse(Pins[pinIndex].Tag.ToString(), out int stationId)
&& stationId <= CUSTOM_ICONS_COUNT
? $"{stationId}" // there is a station marker with index letter for given station id
: "Open"; // there is no station marker. Use open marker.
var colorPartPrefix = GetRessourceNameColorPart(stationsColorList[pinIndex]);
var colorPartPrefix = GetRessourceNameColorPart(stationsColorList[pinIndex]);
var name = $"{indexPartPrefix.ToString().PadLeft(2, '0')}_{colorPartPrefix}{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}";
try
{
Pins[pinIndex].Icon = BitmapDescriptorFactory.FromBundle(name);
}
catch (Exception excption)
{
Log.ForContext<MapPageViewModel>().Error("Station icon {name} can not be loaded. {@excption}.", name, excption);
Pins[pinIndex].Label = stationId.ToString();
Pins[pinIndex].Icon = BitmapDescriptorFactory.DefaultMarker(stationsColorList[pinIndex]);
var name = $"{indexPartPrefix.ToString().PadLeft(2, '0')}_{colorPartPrefix}{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}";
try
{
Pins[pinIndex].Icon = BitmapDescriptorFactory.FromBundle(name);
}
catch (Exception excption)
{
Log.ForContext<MapPageViewModel>().Error("Station icon {name} can not be loaded. {@excption}.", name, excption);
Pins[pinIndex].Label = stationId.ToString();
Pins[pinIndex].Icon = BitmapDescriptorFactory.DefaultMarker(stationsColorList[pinIndex]);
}
}
Pins[pinIndex].IsVisible = true;
@ -294,6 +327,11 @@ namespace TINK.ViewModel.Map
return "Red";
}
if (color == Color.Black)
{
return "NotClickable";
}
return color.ToString();
}
@ -642,14 +680,17 @@ namespace TINK.ViewModel.Map
/// <param name="selectedStationId">Id of station user clicked on.</param>
public async void OnStationClicked(string selectedStationId)
{
try
//Make shure currentLocationPin can not be clicked
if (selectedStationId != "NotClickable")
{
try
{
Log.ForContext<MapPageViewModel>().Information($"User taped station {selectedStationId}.");
// Lock action to prevent multiple instances of "BikeAtStation" being opened.
IsMapPageEnabled = false;
// Lock action to prevent multiple instances of "BikeAtStation" being opened.
IsMapPageEnabled = false;
TinkApp.SelectedStation = TinkApp.Stations.FirstOrDefault(x => x.Id == selectedStationId)
TinkApp.SelectedStation = TinkApp.Stations.FirstOrDefault(x => x.Id == selectedStationId)
?? new Station(selectedStationId, new List<string>(), null); // Station might not be in list StationDictinaly because this list is not updatd in background task.
#if TRYNOTBACKSTYLE
@ -657,24 +698,31 @@ namespace TINK.ViewModel.Map
typeof(BikesAtStationPage),
p_strStationName);
#else
// Show page.
await ViewService.PushAsync(ViewTypes.BikesAtStation);
{
// Show page.
await ViewService.PushAsync(ViewTypes.BikesAtStation);
IsMapPageEnabled = true;
ActionText = "";
}
catch (Exception exception)
{
IsMapPageEnabled = true;
ActionText = "";
IsMapPageEnabled = true;
ActionText = "";
}
}
catch (Exception exception)
{
IsMapPageEnabled = true;
ActionText = "";
Log.ForContext<MapPageViewModel>().Error("Fehler beim Öffnen der Ansicht \"Fahrräder an Station\" aufgetreten. {Exception}", exception);
await ViewService.DisplayAlert(
"Fehler",
$"Fehler beim Öffnen der Ansicht \"Fahrräder an Station\" aufgetreten. {exception.Message}",
"OK");
}
Log.ForContext<MapPageViewModel>().Error("Fehler beim Öffnen der Ansicht \"Fahrräder an Station\" aufgetreten. {Exception}", exception);
await ViewService.DisplayAlert(
"Fehler",
$"Fehler beim Öffnen der Ansicht \"Fahrräder an Station\" aufgetreten. {exception.Message}",
"OK");
}
#endif
}
else
{
return;
}
}
/// <summary>
@ -703,23 +751,30 @@ namespace TINK.ViewModel.Map
var colors = new List<Color>();
foreach (var stationId in stationsId)
{
// Get color of given station.
var bikesAtStation = bikesAll.Where(x => x.StationId == stationId).ToList();
if (bikesAtStation.FirstOrDefault(x => x.State.Value.IsOccupied()) != null)
if (stationId != "NotClickable")
{
// There is at least one requested or booked bike
colors.Add(Color.LightBlue);
continue;
}
// Get color of given station.
var bikesAtStation = bikesAll.Where(x => x.StationId == stationId).ToList();
if (bikesAtStation.FirstOrDefault(x => x.State.Value.IsOccupied()) != null)
{
// There is at least one requested or booked bike
colors.Add(Color.LightBlue);
continue;
}
if (bikesAtStation.ToList().Count > 0)
if (bikesAtStation.ToList().Count > 0)
{
// There is at least one bike available
colors.Add(Color.Green);
continue;
}
colors.Add(Color.Red);
}
else
{
// There is at least one bike available
colors.Add(Color.Green);
continue;
colors.Add(Color.Black);
}
colors.Add(Color.Red);
}
return colors;
@ -832,6 +887,34 @@ namespace TINK.ViewModel.Map
}
}
/// <summary> Command object to bind CurrentLocation Button to view model.</summary>
public System.Windows.Input.ICommand OnCurrentLocationButtonClicked => new Xamarin.Forms.Command(async () => await CenterToCurrentLocation());
/// <summary> User request to center to currentLocation. </summary>
public async Task CenterToCurrentLocation()
{
Location currentLocation = null;
try
{
currentLocation = await GeolocationService.GetAsync();
}
catch (Exception ex)
{
Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
}
if (currentLocation != null)
{
TinkApp.UserMapSpan = MapSpan.FromCenterAndRadius(
new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
TinkApp.ActiveMapSpan.Radius);
TinkApp.Save();
}
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.ActiveMapSpan);
}
/// <summary> Command object to bind login button to view model.</summary>
public System.Windows.Input.ICommand OnToggleTinkToKonrad => new Xamarin.Forms.Command(async () => await ToggleTinkToKonrad());

View file

@ -12,8 +12,8 @@
<ItemGroup>
<PackageReference Include="NSubstitute" Version="4.4.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
</ItemGroup>
<ItemGroup>

View file

@ -13,8 +13,8 @@
<ItemGroup>
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
</ItemGroup>
<ItemGroup>

View file

@ -31,8 +31,8 @@
<ItemGroup>
<PackageReference Include="NSubstitute" Version="4.4.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.3" />
</ItemGroup>

View file

@ -9,11 +9,17 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

View file

@ -12,8 +12,8 @@
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<ReleaseVersion>3.0</ReleaseVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -139,7 +139,7 @@
<Version>3.13.3</Version>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter">
<Version>4.2.1</Version>
<Version>4.3.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>