Skip to content

Commit

Permalink
Upgrade Xamarin Version to 5 -- only builds ok, not tested (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
romanett authored Sep 13, 2024
1 parent bfb3cbe commit 625b1e9
Show file tree
Hide file tree
Showing 8 changed files with 26,563 additions and 4,246 deletions.
25 changes: 24 additions & 1 deletion Samples/XamarinClient/XamarinClient.Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using System;
using System;

using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android;
using Google.Android.Material.Snackbar;

namespace XamarinClient.Droid
{
Expand All @@ -21,7 +23,28 @@ protected override void OnCreate(Bundle bundle)

global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());

//if (CheckSelfPermission(Manifest.Permission.ReadExternalStorage) == Permission.Denied)
//{
// RequestPermissions(new string[] { Manifest.Permission.WriteExternalStorage }, 5);
//}
}

//public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
//{
// if (requestCode == 5)
// {
// if (permissions.Length > 0 && permissions[0] == Manifest.Permission.ReadExternalStorage &&
// grantResults.Length > 0 && grantResults[0] == Permission.Granted)
// {
// //Success
// }
// else
// {
// Toast.MakeText(this, "Failure to get Read Permission!", ToastLength.Long).Show();
// }
// }
//}
}
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.XamarinClient" android:installLocation="auto">
<uses-sdk android:minSdkVersion="15" />
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="33" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand Down
30,757 changes: 26,527 additions & 4,230 deletions Samples/XamarinClient/XamarinClient.Android/Resources/Resource.designer.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<RootNamespace>XamarinClient.Droid</RootNamespace>
<AssemblyName>XamarinClient.Android</AssemblyName>
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v13.0</TargetFrameworkVersion>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
Expand All @@ -31,6 +31,8 @@
<EnableLLVM>false</EnableLLVM>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<BundleAssemblies>false</BundleAssemblies>
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
<AndroidSupportedAbis>armeabi-v7a;x86_64;arm64-v8a</AndroidSupportedAbis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -51,14 +53,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Threading.Tasks.Extensions">
<Version>4.5.0</Version>
<Version>4.5.4</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" />
<PackageReference Include="Xamarin.Android.Support.Design" Version="25.4.0.2" />
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="25.4.0.2" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="25.4.0.2" />
<PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="25.4.0.2" />
<PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="25.4.0.2" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2662" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssetService.cs" />
Expand Down
2 changes: 1 addition & 1 deletion Samples/XamarinClient/XamarinClient.UWP/PathService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* ========================================================================
/* ========================================================================
* Copyright (c) 2005-2019 The OPC Foundation, Inc. All rights reserved.
*
* OPC Foundation MIT License 1.00
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>XamarinClient.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
Expand Down Expand Up @@ -154,7 +154,7 @@
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2662" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.14" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2662" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Samples/XamarinClient/XamarinClient/UA Xamarin Client.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2662" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client" Version="1.5.374.117-preview" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 625b1e9

Please sign in to comment.