New file |
| | |
| | | <Properties StartupConfiguration="{0F1466BC-E714-44E7-A25A-F3C9A7CB7A16}|Default"> |
| | | <MonoDevelop.Ide.ItemProperties.Shared.Droid.JPush PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> |
| | | <MonoDevelop.Ide.Workbench ActiveDocument="Shared.Droid.JPush/Transforms/Metadata.xml"> |
| | | <Files> |
| | | <File FileName="Shared.Droid.JPush/Transforms/EnumMethods.xml" Line="1" Column="1" /> |
| | | <File FileName="Shared.Droid.JPush/Transforms/Metadata.xml" Line="1" Column="1" /> |
| | | </Files> |
| | | <Pads> |
| | | <Pad Id="ProjectPad"> |
| | | <State name="__root__"> |
| | | <Node name="Shared.Droid.JPush" expanded="True"> |
| | | <Node name="Shared.Droid.JPush" expanded="True" selected="True"> |
| | | <Node name="Additions" expanded="True" /> |
| | | <Node name="Jars" expanded="True" /> |
| | | <Node name="Properties" expanded="True" /> |
| | | <Node name="Transforms" expanded="True" /> |
| | | </Node> |
| | | </Node> |
| | | </State> |
| | | </Pad> |
| | | </Pads> |
| | | </MonoDevelop.Ide.Workbench> |
| | | <MonoDevelop.Ide.DebuggingService.PinnedWatches /> |
| | | <MonoDevelop.Ide.Workspace ActiveConfiguration="Release" /> |
| | | <MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <BreakpointStore /> |
| | | </MonoDevelop.Ide.DebuggingService.Breakpoints> |
| | | <MultiItemStartupConfigurations /> |
| | | </Properties> |
New file |
| | |
| | | {"Format":1,"ProjectReferences":[],"MetadataReferences":[{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/Java.Interop.dll","Aliases":[],"Framework":null},{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v8.0/Mono.Android.dll","Aliases":[],"Framework":null},{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/mscorlib.dll","Aliases":[],"Framework":null},{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/System.Core.dll","Aliases":[],"Framework":null},{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/System.dll","Aliases":[],"Framework":null},{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/Facades/System.Runtime.dll","Aliases":[],"Framework":null}],"Files":["/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Properties/AssemblyInfo.cs","/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Jars/AboutJars.txt","/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Additions/AboutAdditions.txt","/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Transforms/Metadata.xml","/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Transforms/EnumFields.xml","/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Transforms/EnumMethods.xml"],"BuildActions":["Compile","None","None","TransformFile","TransformFile","TransformFile"],"Analyzers":[],"AdditionalFiles":[],"EditorConfigFiles":[]} |
New file |
| | |
| | | {"Format":1,"ProjectReferences":[],"MetadataReferences":[{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/Java.Interop.dll","Aliases":[],"Framework":null},{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v8.0/Mono.Android.dll","Aliases":[],"Framework":null},{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/mscorlib.dll","Aliases":[],"Framework":null},{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/System.Core.dll","Aliases":[],"Framework":null},{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/System.dll","Aliases":[],"Framework":null},{"FilePath":"/Library/Frameworks/Xamarin.Android.framework/Versions/11.1.0.17/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/Facades/System.Runtime.dll","Aliases":[],"Framework":null}],"Files":["/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Properties/AssemblyInfo.cs","/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Jars/AboutJars.txt","/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Additions/AboutAdditions.txt","/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Transforms/Metadata.xml","/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Transforms/EnumFields.xml","/Users/jlchen/JLChen/ProjectsCode/HDLGit/Shared.Droid.JPush/Shared.Droid.JPush/Shared.Droid.JPush/Transforms/EnumMethods.xml"],"BuildActions":["Compile","None","None","TransformFile","TransformFile","TransformFile"],"Analyzers":[],"AdditionalFiles":[],"EditorConfigFiles":[]} |
New file |
| | |
| | |
|
| | | Microsoft Visual Studio Solution File, Format Version 12.00
|
| | | # Visual Studio Version 16
|
| | | VisualStudioVersion = 16.0.808.1
|
| | | MinimumVisualStudioVersion = 10.0.40219.1
|
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.Droid.JPush", "Shared.Droid.JPush\Shared.Droid.JPush.csproj", "{0F1466BC-E714-44E7-A25A-F3C9A7CB7A16}"
|
| | | EndProject
|
| | | Global
|
| | | GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
| | | Debug|Any CPU = Debug|Any CPU
|
| | | Release|Any CPU = Release|Any CPU
|
| | | EndGlobalSection
|
| | | GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
| | | {0F1466BC-E714-44E7-A25A-F3C9A7CB7A16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
| | | {0F1466BC-E714-44E7-A25A-F3C9A7CB7A16}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
| | | {0F1466BC-E714-44E7-A25A-F3C9A7CB7A16}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
| | | {0F1466BC-E714-44E7-A25A-F3C9A7CB7A16}.Release|Any CPU.Build.0 = Release|Any CPU
|
| | | EndGlobalSection
|
| | | GlobalSection(SolutionProperties) = preSolution
|
| | | HideSolutionNode = FALSE
|
| | | EndGlobalSection
|
| | | GlobalSection(ExtensibilityGlobals) = postSolution
|
| | | SolutionGuid = {17957775-0F35-4177-AE73-31D0AC2D9FBE}
|
| | | EndGlobalSection
|
| | | EndGlobal
|
New file |
| | |
| | | Additions allow you to add arbitrary C# to the generated classes |
| | | before they are compiled. This can be helpful for providing convenience |
| | | methods or adding pure C# classes. |
| | | |
| | | == Adding Methods to Generated Classes == |
| | | |
| | | Let's say the library being bound has a Rectangle class with a constructor |
| | | that takes an x and y position, and a width and length size. It will look like |
| | | this: |
| | | |
| | | public partial class Rectangle |
| | | { |
| | | public Rectangle (int x, int y, int width, int height) |
| | | { |
| | | // JNI bindings |
| | | } |
| | | } |
| | | |
| | | Imagine we want to add a constructor to this class that takes a Point and |
| | | Size structure instead of 4 ints. We can add a new file called Rectangle.cs |
| | | with a partial class containing our new method: |
| | | |
| | | public partial class Rectangle |
| | | { |
| | | public Rectangle (Point location, Size size) : |
| | | this (location.X, location.Y, size.Width, size.Height) |
| | | { |
| | | } |
| | | } |
| | | |
| | | At compile time, the additions class will be added to the generated class |
| | | and the final assembly will a Rectangle class with both constructors. |
| | | |
| | | |
| | | == Adding C# Classes == |
| | | |
| | | Another thing that can be done is adding fully C# managed classes to the |
| | | generated library. In the above example, let's assume that there isn't a |
| | | Point class available in Java or our library. The one we create doesn't need |
| | | to interact with Java, so we'll create it like a normal class in C#. |
| | | |
| | | By adding a Point.cs file with this class, it will end up in the binding library: |
| | | |
| | | public class Point |
| | | { |
| | | public int X { get; set; } |
| | | public int Y { get; set; } |
| | | } |
New file |
| | |
| | | This directory is for Android .jars. |
| | | |
| | | There are 2 types of jars that are supported: |
| | | |
| | | == Input Jar == |
| | | |
| | | This is the jar that bindings should be generated for. |
| | | |
| | | For example, if you were binding the Google Maps library, this would |
| | | be Google's "maps.jar". |
| | | |
| | | Set the build action for these jars in the properties page to "InputJar". |
| | | |
| | | |
| | | == Reference Jars == |
| | | |
| | | These are jars that are referenced by the input jar. C# bindings will |
| | | not be created for these jars. These jars will be used to resolve |
| | | types used by the input jar. |
| | | |
| | | NOTE: Do not add "android.jar" as a reference jar. It will be added automatically |
| | | based on the Target Framework selected. |
| | | |
| | | Set the build action for these jars in the properties page to "ReferenceJar". |
New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | using Android.App; |
| | | |
| | | // General Information about an assembly is controlled through the following |
| | | // set of attributes. Change these attribute values to modify the information |
| | | // associated with an assembly. |
| | | [assembly: AssemblyTitle("Shared.Droid.JPush")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("Shared.Droid.JPush")] |
| | | [assembly: AssemblyCopyright("Copyright © 2018")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // Version information for an assembly consists of the following four values: |
| | | // |
| | | // Major Version |
| | | // Minor Version |
| | | // Build Number |
| | | // Revision |
| | | [assembly: AssemblyVersion("1.0.0.0")] |
| | | [assembly: AssemblyFileVersion("1.0.0.0")] |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProductVersion>8.0.30703</ProductVersion> |
| | | <SchemaVersion>2.0</SchemaVersion> |
| | | <ProjectGuid>{0F1466BC-E714-44E7-A25A-F3C9A7CB7A16}</ProjectGuid> |
| | | <ProjectTypeGuids>{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
| | | <TemplateGuid>{77efb91c-a7e9-4b0e-a7c5-31eeec3c6d46}</TemplateGuid> |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>Shared.Droid.JPush</RootNamespace> |
| | | <AssemblyName>Shared.Droid.JPush</AssemblyName> |
| | | <FileAlignment>512</FileAlignment> |
| | | <Deterministic>True</Deterministic> |
| | | <TargetFrameworkVersion>v8.0</TargetFrameworkVersion> |
| | | <AndroidClassParser>class-parse</AndroidClassParser> |
| | | <AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget> |
| | | <RestoreProjectStyle>PackageReference</RestoreProjectStyle> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>portable</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>portable</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="Mono.Android" /> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Core" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="Jars\AboutJars.txt" /> |
| | | <None Include="Additions\AboutAdditions.txt" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <TransformFile Include="Transforms\Metadata.xml" /> |
| | | <TransformFile Include="Transforms\EnumFields.xml" /> |
| | | <TransformFile Include="Transforms\EnumMethods.xml" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" /> |
| | | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
| | | Other similar extension points exist, see Microsoft.Common.targets. |
| | | <Target Name="BeforeBuild"> |
| | | </Target> |
| | | <Target Name="AfterBuild"> |
| | | </Target> |
| | | --> |
| | | </Project> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <enum-field-mappings> |
| | | <!-- |
| | | This example converts the constants Fragment_id, Fragment_name, |
| | | and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag |
| | | to an enum called Android.Support.V4.App.FragmentTagType with values |
| | | Id, Name, and Tag. |
| | | |
| | | <mapping jni-class="android/support/v4/app/FragmentActivity$FragmentTag" clr-enum-type="Android.Support.V4.App.FragmentTagType"> |
| | | <field jni-name="Fragment_name" clr-name="Name" value="0" /> |
| | | <field jni-name="Fragment_id" clr-name="Id" value="1" /> |
| | | <field jni-name="Fragment_tag" clr-name="Tag" value="2" /> |
| | | </mapping> |
| | | --> |
| | | </enum-field-mappings> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <enum-method-mappings> |
| | | <!-- |
| | | This example changes the Java method: |
| | | android.support.v4.app.Fragment.SavedState.writeToParcel (int flags) |
| | | to be: |
| | | android.support.v4.app.Fragment.SavedState.writeToParcel (Android.OS.ParcelableWriteFlags flags) |
| | | when bound in C#. |
| | | |
| | | <mapping jni-class="android/support/v4/app/Fragment.SavedState"> |
| | | <method jni-name="writeToParcel" parameter="flags" clr-enum-type="Android.OS.ParcelableWriteFlags" /> |
| | | </mapping> |
| | | --> |
| | | </enum-method-mappings> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <metadata> |
| | | <!-- |
| | | This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask: |
| | | <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" /> |
| | | |
| | | This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground: |
| | | <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" /> |
| | | --> |
| | | </metadata> |