Skip to content

Commit

Permalink
Version 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
adriano committed Jan 6, 2017
1 parent 3ad54b9 commit 992b3ee
Show file tree
Hide file tree
Showing 17 changed files with 247 additions and 100 deletions.
2 changes: 1 addition & 1 deletion App/QR2Web/QR2Web.Droid/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:versionName="1.2" android:versionCode="12">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:versionName="1.3" android:versionCode="13">
<uses-sdk android:minSdkVersion="17" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
Expand Down
2 changes: 1 addition & 1 deletion App/QR2Web/QR2Web.Droid/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
<package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Forms" version="2.3.3.175" targetFramework="monoandroid60" />
<package id="ZXing.Net.Mobile" version="2.1.47" targetFramework="monoandroid60" />
<package id="ZXing.Net.Mobile.Forms" version="2.1.47" targetFramework="monoandroid60" />
<package id="ZXing.Net.Mobile.Forms" version="2.1.47" targetFramework="monoandroid70" />
</packages>
53 changes: 48 additions & 5 deletions App/QR2Web/QR2Web.UWP/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
Expand Down Expand Up @@ -32,6 +33,48 @@ public App()
this.Suspending += OnSuspending;
}

private void InitXamarin(IActivatedEventArgs e)
{
//// Workaround to show the scanner also on Windows.
List<Assembly> assembliesToInclude = new List<Assembly>();

assembliesToInclude.Add(typeof(ZXing.BarcodeReader).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Reader).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.BaseLuminanceSource).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Binarizer).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.BinaryBitmap).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Dimension).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.LuminanceSource).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.MultiFormatReader).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.PlanarYUVLuminanceSource).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Result).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.ResultPoint).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.RGBLuminanceSource).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.SupportClass).GetTypeInfo().Assembly);

assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.ZXingBarcodeImageView).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.ZXingScannerPage).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.ZXingScannerView).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.ZXingDefaultOverlay).GetTypeInfo().Assembly);

assembliesToInclude.Add(typeof(ZXing.Net.Mobile.ZXing_Net_Mobile_WindowsUniversal_XamlTypeInfo.XamlMetaDataProvider).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingBarcodeImageViewRenderer).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingScannerViewRenderer).GetTypeInfo().Assembly);

assembliesToInclude.Add(typeof(ZXing.Mobile.MobileBarcodeScanner).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Mobile.MobileBarcodeScannerBase).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Mobile.MobileBarcodeScanningOptions).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Mobile.ScanPage).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Mobile.MobileBarcodeScannerBase).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Mobile.SoftwareBitmapLuminanceSource).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Mobile.ZXingScannerControl).GetTypeInfo().Assembly);

Xamarin.Forms.Forms.Init(e, assembliesToInclude);
//// End workaround, the original init is only 1 line:

//Xamarin.Forms.Forms.Init(e);
}

/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
Expand All @@ -58,7 +101,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)

rootFrame.NavigationFailed += OnNavigationFailed;

Xamarin.Forms.Forms.Init(e);
InitXamarin(e);

if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
Expand Down Expand Up @@ -86,8 +129,8 @@ protected override void OnActivated(IActivatedEventArgs args)
{
ProtocolActivatedEventArgs pargs = (ProtocolActivatedEventArgs)args;
bool success = false;

if(pargs.PreviousExecutionState == ApplicationExecutionState.ClosedByUser ||
if (pargs.PreviousExecutionState == ApplicationExecutionState.ClosedByUser ||
pargs.PreviousExecutionState == ApplicationExecutionState.NotRunning)
{
Frame rootFrame = Window.Current.Content as Frame;
Expand All @@ -101,8 +144,8 @@ protected override void OnActivated(IActivatedEventArgs args)

rootFrame.NavigationFailed += OnNavigationFailed;

Xamarin.Forms.Forms.Init(args);
InitXamarin(args);

// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
Expand Down
1 change: 1 addition & 0 deletions App/QR2Web/QR2Web.UWP/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public void LockPortrait(bool tryToLock)
public void InitExternalLibraries()
{
ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingScannerViewRenderer.Init();

}

public void InitOSSettings()
Expand Down
19 changes: 10 additions & 9 deletions App/QR2Web/QR2Web.UWP/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="6469Adriano.QR2WebInventory" Publisher="CN=39092E3A-7130-410B-B315-09A9DDDBDEA9" Version="1.2.1.0" />
<Identity Name="6469Adriano.QR2WebInventory" Publisher="CN=39092E3A-7130-410B-B315-09A9DDDBDEA9" Version="1.3.1.0" />
<mp:PhoneIdentity PhoneProductId="f736c883-f105-4d30-a719-4bf328872f5e" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>QR2Web Inventory</DisplayName>
Expand All @@ -22,27 +22,27 @@
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.protocol" EntryPoint="QR2Web.App">
<uap:Protocol Name="readbarcode">
<uap:Protocol Name="p2spro">
<uap:Logo>QR.png</uap:Logo>
<uap:DisplayName>QR to Web</uap:DisplayName>
<uap:DisplayName>Pic2Shop Emulation</uap:DisplayName>
</uap:Protocol>
</uap:Extension>
<uap:Extension Category="windows.protocol" EntryPoint="QR2Web.App">
<uap:Protocol Name="qr2web">
<uap:Protocol Name="mochabarcode">
<uap:Logo>QR.png</uap:Logo>
<uap:DisplayName>QR to Web</uap:DisplayName>
<uap:DisplayName>Mocha Emulation</uap:DisplayName>
</uap:Protocol>
</uap:Extension>
<uap:Extension Category="windows.protocol" EntryPoint="QR2Web.App">
<uap:Protocol Name="mochabarcode">
<uap:Protocol Name="qr2web">
<uap:Logo>QR.png</uap:Logo>
<uap:DisplayName>Mocha Emulation</uap:DisplayName>
<uap:DisplayName>QR to Web</uap:DisplayName>
</uap:Protocol>
</uap:Extension>
<uap:Extension Category="windows.protocol" EntryPoint="QR2Web.App">
<uap:Protocol Name="p2spro">
<uap:Protocol Name="readbarcode">
<uap:Logo>QR.png</uap:Logo>
<uap:DisplayName>Pic2Shop Emulation</uap:DisplayName>
<uap:DisplayName>QR to Web</uap:DisplayName>
</uap:Protocol>
</uap:Extension>
</Extensions>
Expand All @@ -52,5 +52,6 @@
<Capability Name="internetClient" />
<DeviceCapability Name="location" />
<DeviceCapability Name="webcam" />
<DeviceCapability Name="microphone" />
</Capabilities>
</Package>
2 changes: 1 addition & 1 deletion App/QR2Web/QR2Web.UWP/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("QR to Web Inventory")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
22 changes: 21 additions & 1 deletion App/QR2Web/QR2Web.UWP/QR2Web.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
Expand Down Expand Up @@ -144,7 +145,26 @@
</Page>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
<Reference Include="ZXing.Net.Mobile.Core, Version=1.0.6211.31972, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\ZXing.Net.Mobile\Build\Forms\Release\uwp\ZXing.Net.Mobile.Core.dll</HintPath>
</Reference>
<Reference Include="ZXing.Net.Mobile.Forms, Version=2.1.47.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\ZXing.Net.Mobile\Build\Forms\Release\uwp\ZXing.Net.Mobile.Forms.dll</HintPath>
</Reference>
<Reference Include="ZXing.Net.Mobile.Forms.WindowsUniversal, Version=2.1.47.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\ZXing.Net.Mobile\Build\Forms\Release\uwp\ZXing.Net.Mobile.Forms.WindowsUniversal.dll</HintPath>
</Reference>
<Reference Include="zxing.portable, Version=0.14.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\ZXing.Net.Mobile\Build\Forms\Release\uwp\zxing.portable.dll</HintPath>
</Reference>
<Reference Include="ZXingNetMobile, Version=1.0.6211.31974, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\ZXing.Net.Mobile\Build\Forms\Release\uwp\ZXingNetMobile.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
Expand Down
3 changes: 1 addition & 2 deletions App/QR2Web/QR2Web.UWP/project.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2",
"Xamarin.Forms": "2.3.3.175",
"ZXing.Net.Mobile.Forms": "2.1.47"
"Xamarin.Forms": "2.3.3.175"
},
"frameworks": {
"uap10.0": {}
Expand Down
5 changes: 0 additions & 5 deletions App/QR2Web/QR2Web.iOS/Entitlements.plist

This file was deleted.

14 changes: 9 additions & 5 deletions App/QR2Web/QR2Web.iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>6.0</string>
<string>8.1</string>
<key>CFBundleDisplayName</key>
<string>QR2Web</string>
<string>qr2web Inventory</string>
<key>CFBundleIdentifier</key>
<string>ch.petrucci.QR2Web</string>
<string>ch.petrucci.qr2web-Inventory</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<string>2</string>
<key>CFBundleIconFiles</key>
<array>
<string>[email protected]</string>
Expand Down Expand Up @@ -59,6 +59,10 @@
</dict>
</array>
<key>CFBundleShortVersionString</key>
<string>1.2</string>
<string>1.3</string>
<key>UIMainStoryboardFile</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile~ipad</key>
<string>LaunchScreen</string>
</dict>
</plist>
38 changes: 31 additions & 7 deletions App/QR2Web/QR2Web.iOS/QR2Web.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,24 @@
<OutputType>Exe</OutputType>
<RootNamespace>QR2Web.iOS</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>QR2WebiOS</AssemblyName>
<AssemblyName>QR2Web</AssemblyName>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -49,7 +64,8 @@
<MtouchArch>ARMv7, ARM64</MtouchArch>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignEntitlements>
</CodesignEntitlements>
<BuildIpa>True</BuildIpa>
<IpaIncludeArtwork>False</IpaIncludeArtwork>
</PropertyGroup>
Expand All @@ -73,10 +89,9 @@
<ConsolePause>False</ConsolePause>
<MtouchArch>ARMv7, ARM64</MtouchArch>
<BuildIpa>True</BuildIpa>
<CodesignProvision>Automatic:AdHoc</CodesignProvision>
<CodesignKey>iPhone Distribution</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<CodesignKey>iPhone Developer: [email protected] (N72LA2ZQZV)</CodesignKey>
<IpaIncludeArtwork>False</IpaIncludeArtwork>
<CodesignProvision>7a679996-b650-46a0-9f1b-0539da42258d</CodesignProvision>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' ">
<DebugType>none</DebugType>
Expand All @@ -90,16 +105,18 @@
<CodesignKey>iPhone Distribution</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup>
<StartupObject>QR2Web.iOS.Application</StartupObject>
</PropertyGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<None Include="Entitlements.plist" />
<ITunesArtwork Include="iTunesArtwork%402x" />
<None Include="Info.plist">
<SubType>Designer</SubType>
</None>
<Compile Include="Properties\AssemblyInfo.cs" />
<ITunesArtwork Include="iTunesArtwork" />
<ITunesArtwork Include="iTunesArtwork@2x" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -189,6 +206,13 @@
<ItemGroup>
<BundleResource Include="Resources\scanl1.png" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="..\QR2Web\QR2Web.projitems" Label="Shared" Condition="Exists('..\QR2Web\QR2Web.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<Import Project="..\..\packages\Xamarin.Forms.2.3.3.175\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.3.175\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
Expand Down
Binary file modified App/QR2Web/QR2Web.iOS/iTunesArtwork
Binary file not shown.
Binary file modified App/QR2Web/QR2Web.iOS/iTunesArtwork@2x
Binary file not shown.
Loading

0 comments on commit 992b3ee

Please sign in to comment.