Skip to content

Commit

Permalink
switching android demo to new binding package
Browse files Browse the repository at this point in the history
  • Loading branch information
micjahn committed Oct 9, 2020
1 parent 68c6337 commit 3b19a78
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Clients/MonoAndroidDemo/DecoderActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

namespace MonoAndroidDemo
{
[Activity (Label = "Read:")]
using ZXing.Android;

[Activity (Label = "Read:")]
public class DecoderActivity : Activity
{
public static BarcodeFormat CurrentFormat = BarcodeFormat.QR_CODE;
Expand Down Expand Up @@ -160,7 +162,7 @@ void Decode (Android.Graphics.Bitmap image)
{
try
{
var reader = new BarcodeReader ();
var reader = new BarcodeReader();
reader.Options.PossibleFormats = new List<BarcodeFormat> () { CurrentFormat };
reader.Options.TryHarder = true;
var result = reader.Decode (image);
Expand Down
8 changes: 4 additions & 4 deletions Clients/MonoAndroidDemo/MonoAndroidDemo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
<Reference Include="zxing, Version=0.16.5.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\..\packages\ZXing.Net.0.16.6-beta1\lib\netstandard2.0\zxing.dll</HintPath>
<Reference Include="zxing, Version=0.16.6.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\..\packages\ZXing.Net.0.16.6\lib\netstandard2.0\zxing.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -94,11 +94,11 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
<Import Project="..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" />
<Import Project="..\..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NETStandard.Library.2.0.0\build\netstandard2.0\NETStandard.Library.targets'))" />
<Error Condition="!Exists('..\..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets'))" />
</Target>
</Project>
7 changes: 7 additions & 0 deletions Clients/MonoAndroidDemo/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.NETCore.Platforms" version="2.0.2" targetFramework="monoandroid23" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="monoandroid23" />
<package id="ZXing.Net" version="0.16.6" targetFramework="monoandroid23" />
<package id="ZXing.Net.Bindings.Android" version="0.16.6" targetFramework="monoandroid23" />
</packages>
51 changes: 51 additions & 0 deletions zxing.vs2017.sln
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bindings", "Bindings", "{E1
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Android", "Source\Bindings\ZXing.Android\ZXing.Android.csproj", "{8080C792-EB9B-4CE8-B52E-740ABB68AE50}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoAndroidDemo", "Clients\MonoAndroidDemo\MonoAndroidDemo.csproj", "{14DFA0B8-A311-46BD-A1BD-A0808473CD80}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug - Reduced|Any CPU = Debug - Reduced|Any CPU
Expand Down Expand Up @@ -1211,6 +1213,54 @@ Global
{8080C792-EB9B-4CE8-B52E-740ABB68AE50}.Release|x64.Build.0 = Release|Any CPU
{8080C792-EB9B-4CE8-B52E-740ABB68AE50}.Release|x86.ActiveCfg = Release|Any CPU
{8080C792-EB9B-4CE8-B52E-740ABB68AE50}.Release|x86.Build.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|Any CPU.ActiveCfg = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|Any CPU.Build.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|Any CPU.Deploy.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|ARM.ActiveCfg = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|ARM.Build.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|ARM.Deploy.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|x64.ActiveCfg = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|x64.Build.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|x64.Deploy.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|x86.ActiveCfg = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|x86.Build.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug - Reduced|x86.Deploy.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|ARM.ActiveCfg = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|ARM.Build.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|ARM.Deploy.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|x64.ActiveCfg = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|x64.Build.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|x64.Deploy.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|x86.ActiveCfg = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|x86.Build.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Debug|x86.Deploy.0 = Debug|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|Any CPU.ActiveCfg = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|Any CPU.Build.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|Any CPU.Deploy.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|ARM.ActiveCfg = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|ARM.Build.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|ARM.Deploy.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|x64.ActiveCfg = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|x64.Build.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|x64.Deploy.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|x86.ActiveCfg = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|x86.Build.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release with Documentation|x86.Deploy.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|Any CPU.Build.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|Any CPU.Deploy.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|ARM.ActiveCfg = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|ARM.Build.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|ARM.Deploy.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|x64.ActiveCfg = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|x64.Build.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|x64.Deploy.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|x86.ActiveCfg = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|x86.Build.0 = Release|Any CPU
{14DFA0B8-A311-46BD-A1BD-A0808473CD80}.Release|x86.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1240,6 +1290,7 @@ Global
{F983B572-DCD7-4AB4-B9D5-D218A22BA5FE} = {7D5D173D-0A00-4F57-9F02-0739E4C70555}
{CD937642-91A0-4371-9452-336F8CC63121} = {7D5D173D-0A00-4F57-9F02-0739E4C70555}
{8080C792-EB9B-4CE8-B52E-740ABB68AE50} = {E13D10BC-67C7-4D85-AAA9-8D7650327B9F}
{14DFA0B8-A311-46BD-A1BD-A0808473CD80} = {751F738A-6DBF-4E2B-8FCD-D381E46D979D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {73A9B453-AE71-4A98-B68A-2389573CD311}
Expand Down

0 comments on commit 3b19a78

Please sign in to comment.