mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-20 12:06:29 +02:00
Version 3.0.350
This commit is contained in:
parent
7f49fb0ac5
commit
40b96f0350
70 changed files with 12021 additions and 8388 deletions
BIN
TINK/TINK.Android/Assets/Location_Pin.png
Normal file
BIN
TINK/TINK.Android/Assets/Location_Pin.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
5406
TINK/TINK.Android/Resources/Resource.Designer.cs
generated
5406
TINK/TINK.Android/Resources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load diff
BIN
TINK/TINK.Android/Resources/drawable/Location_Button.png
Normal file
BIN
TINK/TINK.Android/Resources/drawable/Location_Button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue