1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-28 22:15:37 +00:00

Test Android ok

This commit is contained in:
Yan Maniez 2020-12-21 02:24:59 +01:00
parent fcca727ecf
commit 103de93924
10 changed files with 3443 additions and 2527 deletions

View file

@ -215,6 +215,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite">
<Version>5.0.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore">
<Version>5.0.1</Version>
</PackageReference>

View file

@ -43,7 +43,7 @@ namespace AideDeJeu.Droid
Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
//Xamarin.Essentials.ExperimentalFeatures.Enable(Xamarin.Essentials.ExperimentalFeatures.ShareFileRequest);
Rg.Plugins.Popup.Popup.Init(this, bundle);
Rg.Plugins.Popup.Popup.Init(this); //, bundle);
//global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
//global::Xamarin.Forms.Forms.SetFlags("Shell_Experimental");

View file

@ -25,7 +25,7 @@ namespace AideDeJeu.Droid
PackageManager manager = context.PackageManager;
PackageInfo info = manager.GetPackageInfo(context.PackageName, 0);
return info.VersionCode;
return Android.Resource.Attribute.VersionCode; // info.VersionCode;
}
public async Task<string> GetDatabasePathAsync(string databaseName)
@ -198,13 +198,13 @@ namespace AideDeJeu.Droid
// https://www.syncfusion.com/kb/8707/how-to-share-the-pdf-document-in-xamarin-forms-platform
public async Task LaunchFileAsync(string title, string message, string filePath)
{
var context = Android.App.Application.Context;
/*var context = Android.App.Application.Context;
var uri = Android.Support.V4.Content.FileProvider.GetUriForFile(context, context.PackageName + ".fileprovider", new Java.IO.File(filePath));
//var uri = Android.Net.Uri.Parse("file://" + filePath);
var intent = new Intent(Intent.ActionView);
intent.SetDataAndType(uri, "application/pdf");
intent.SetFlags(ActivityFlags.NewTask | ActivityFlags.GrantReadUriPermission);
context.StartActivity(intent);
context.StartActivity(intent);*/
}
}

View file

@ -2,10 +2,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.nioux.aidedejeu" android:installLocation="auto" android:versionCode="14002" android:versionName="1.40.02">
<uses-sdk android:targetSdkVersion="29" android:minSdkVersion="16" />
<application android:label="Haches &amp; Dés">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="com.nioux.aidedejeu.fileprovider" android:exported="false" android:grantUriPermissions="true">
<!--<provider android:name="android.support.v4.content.FileProvider" android:authorities="com.nioux.aidedejeu.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"></meta-data>
</provider>
<activity android:name=".SearchActivity" android:label="Aide de Jeu">
</provider>-->
<!--
<activity android:name=".SearchActivity" android:label="Aide de Jeu">
<intent-filter>
<action android:name="com.google.android.gms.actions.SEARCH_ACTION" />
<category android:name="android.intent.category.DEFAULT" />
@ -14,6 +15,6 @@
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
</activity>
</activity>-->
</application>
</manifest>

File diff suppressed because it is too large Load diff

View file

@ -215,6 +215,9 @@
<Reference Include="Xamarin.iOS" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite">
<Version>5.0.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore">
<Version>5.0.1</Version>
</PackageReference>
@ -236,6 +239,12 @@
<PackageReference Include="sqlite-net-pcl">
<Version>1.8.0-beta</Version>
</PackageReference>
<PackageReference Include="SQLitePCLRaw.core">
<Version>2.0.4</Version>
</PackageReference>
<PackageReference Include="SQLitePCLRaw.provider.sqlite3.ios_unified">
<Version>1.1.14</Version>
</PackageReference>
<PackageReference Include="System.Buffers">
<Version>4.5.1</Version>
</PackageReference>

View file

@ -28,7 +28,8 @@ namespace AideDeJeu.iOS
Rg.Plugins.Popup.Popup.Init();
global::Xamarin.Forms.Forms.Init();
SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_dynamic_cdecl());//.SQLite3Provider_sqlite3());
SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_sqlite3());
//SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_dynamic_cdecl());//.SQLite3Provider_sqlite3());
//Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
LoadApplication(new App());

View file

@ -323,7 +323,7 @@ namespace AideDeJeuLib
var serializer = builder
//.EnsureRoundtrip()
//.WithNamingConvention(new PascalCaseNamingConvention())
.WithNamingConvention(new UnderscoredNamingConvention())
.WithNamingConvention(UnderscoredNamingConvention.Instance)
.Build();
return serializer.Serialize(this);
}
@ -371,14 +371,14 @@ namespace AideDeJeuLib
builder = builder.WithTagMapping($"!{mapping.Key}", mapping.Value);
}
var yamlDeserializer = builder
.WithNamingConvention(new PascalCaseNamingConvention())
.WithNamingConvention(PascalCaseNamingConvention.Instance)
.Build();
var parser = new Parser(new System.IO.StringReader(yamlmd));
parser.Expect<StreamStart>();
parser.Expect<DocumentStart>();
parser.Consume<StreamStart>();
parser.Consume<DocumentStart>();
var post = yamlDeserializer.Deserialize(parser);
parser.Expect<DocumentEnd>();
parser.Consume<DocumentEnd>();
//parser.MoveNext();
var item = post as Item;
item.Markdown = yamlmd.Substring(parser.Current.End.Index + 1);
@ -432,8 +432,8 @@ namespace AideDeJeuLib
return $"{Name} ({NewId})";
}
static IDeserializer _Deserializer = new DeserializerBuilder().WithNamingConvention(new PascalCaseNamingConvention()).Build();
static ISerializer _Serializer = new SerializerBuilder().WithNamingConvention(new PascalCaseNamingConvention()).Build();
static IDeserializer _Deserializer = new DeserializerBuilder().WithNamingConvention(PascalCaseNamingConvention.Instance).Build();
static ISerializer _Serializer = new SerializerBuilder().WithNamingConvention(PascalCaseNamingConvention.Instance).Build();
[YamlIgnore]
protected OrderedDictionary Attributes { get; private set; } = new OrderedDictionary();

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net5.0-windows</TargetFramework>
<LangVersion>latest</LangVersion>
<ReleaseVersion>1.32</ReleaseVersion>
<Configurations>Debug;Release;Debug_JoA;Release_JoA</Configurations>
@ -14,9 +14,11 @@
<ItemGroup>
<PackageReference Include="HtmlAgilityPack" Version="1.11.29" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="5.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.1" />
<PackageReference Include="sqlite-net-pcl" Version="1.8.0-beta" />
<PackageReference Include="SQLitePCLRaw.core" Version="2.0.4" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
<PackageReference Include="UrhoSharp.Forms" Version="1.9.67" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.0-rc1" />

View file

@ -945,7 +945,7 @@ namespace AideDeJeuCmd
static async Task TestPdfAsync()
{
Tests.Xamarin.Forms.Mocks.MockForms.Init();
SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_e_sqlite3());
SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_dynamic_cdecl()); //.SQLite3Provider_e_sqlite3());
DependencyService.Register<INativeAPI, AideDeJeu.Cmd.Version_CMD>();
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
//Xamarin.Essentials.Platform.Init(this, bundle);
@ -976,7 +976,8 @@ namespace AideDeJeuCmd
static async Task BuildLibraryAsync()
{
Tests.Xamarin.Forms.Mocks.MockForms.Init();
SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_e_sqlite3());
//var truc = new SQLite3Provider_e_sqlite3();
SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_dynamic_cdecl()); //.SQLite3Provider_e_sqlite3());
DependencyService.Register<INativeAPI, AideDeJeu.Cmd.Version_CMD>();
//var store = new StoreViewModel();
//await store.GetItemFromDataAsync("test", "truc");