Skip to content

Commit f72eeea

Browse files
committed
Initial commit
1 parent a51d52a commit f72eeea

29 files changed

+1142
-99
lines changed

.gitignore

Lines changed: 29 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
2+
[Bb]in/
3+
[Oo]bj/
4+
5+
# mstest test results
6+
TestResults
7+
18
## Ignore Visual Studio temporary files, build results, and
29
## files generated by popular Visual Studio add-ons.
310

@@ -8,35 +15,10 @@
815

916
# Build results
1017
[Dd]ebug/
11-
[Dd]ebugPublic/
1218
[Rr]elease/
13-
[Rr]eleases/
1419
x64/
15-
x86/
16-
build/
17-
bld/
18-
[Bb]in/
19-
[Oo]bj/
20-
21-
# Roslyn cache directories
22-
*.ide/
23-
24-
# MSTest test Results
25-
[Tt]est[Rr]esult*/
26-
[Bb]uild[Ll]og.*
27-
28-
#NUNIT
29-
*.VisualState.xml
30-
TestResult.xml
31-
32-
# Build Results of an ATL Project
33-
[Dd]ebugPS/
34-
[Rr]eleasePS/
35-
dlldata.c
36-
3720
*_i.c
3821
*_p.c
39-
*_i.h
4022
*.ilk
4123
*.meta
4224
*.obj
@@ -50,64 +32,35 @@ dlldata.c
5032
*.tli
5133
*.tlh
5234
*.tmp
53-
*.tmp_proj
5435
*.log
5536
*.vspscc
5637
*.vssscc
5738
.builds
58-
*.pidb
59-
*.svclog
60-
*.scc
61-
62-
# Chutzpah Test files
63-
_Chutzpah*
6439

6540
# Visual C++ cache files
6641
ipch/
6742
*.aps
6843
*.ncb
6944
*.opensdf
7045
*.sdf
71-
*.cachefile
7246

7347
# Visual Studio profiler
7448
*.psess
7549
*.vsp
7650
*.vspx
7751

78-
# TFS 2012 Local Workspace
79-
$tf/
80-
8152
# Guidance Automation Toolkit
8253
*.gpState
8354

8455
# ReSharper is a .NET coding add-in
85-
_ReSharper*/
86-
*.[Rr]e[Ss]harper
87-
*.DotSettings.user
88-
89-
# JustCode is a .NET coding addin-in
90-
.JustCode
91-
92-
# TeamCity is a build add-in
93-
_TeamCity*
94-
95-
# DotCover is a Code Coverage Tool
96-
*.dotCover
56+
_ReSharper*
9757

9858
# NCrunch
99-
_NCrunch_*
59+
*.ncrunch*
10060
.*crunch*.local.xml
10161

102-
# MightyMoose
103-
*.mm.*
104-
AutoTest.Net/
105-
106-
# Web workbench (sass)
107-
.sass-cache/
108-
109-
# Installshield output folder
110-
[Ee]xpress/
62+
# Installshield output folder
63+
[Ee]xpress
11164

11265
# DocProject is a documentation generator add-in
11366
DocProject/buildhelp/
@@ -120,64 +73,41 @@ DocProject/Help/Html2
12073
DocProject/Help/html
12174

12275
# Click-Once directory
123-
publish/
76+
publish
12477

12578
# Publish Web Output
126-
*.[Pp]ublish.xml
127-
*.azurePubxml
128-
# TODO: Comment the next line if you want to checkin your web deploy settings
129-
# but database connection strings (with potential passwords) will be unencrypted
130-
*.pubxml
131-
*.publishproj
132-
133-
# NuGet Packages
134-
*.nupkg
135-
# The packages folder can be ignored because of Package Restore
136-
**/packages/*
137-
# except build/, which is used as an MSBuild target.
138-
!**/packages/build/
139-
# If using the old MSBuild-Integrated Package Restore, uncomment this:
140-
#!**/packages/repositories.config
79+
*.Publish.xml
80+
81+
# NuGet Packages Directory
82+
packages
14183

14284
# Windows Azure Build Output
143-
csx/
85+
csx
14486
*.build.csdef
14587

14688
# Windows Store app package directory
14789
AppPackages/
14890

14991
# Others
150-
sql/
92+
[Bb]in
93+
[Oo]bj
94+
sql
95+
TestResults
96+
[Tt]est[Rr]esult*
15197
*.Cache
152-
ClientBin/
98+
ClientBin
15399
[Ss]tyle[Cc]op.*
154100
~$*
155-
*~
156101
*.dbmdl
157-
*.dbproj.schemaview
158-
*.pfx
159-
*.publishsettings
160-
node_modules/
102+
Generated_Code #added for RIA/Silverlight projects
161103

162-
# RIA/Silverlight projects
163-
Generated_Code/
164-
165-
# Backup & report files from converting an old project file
166-
# to a newer Visual Studio version. Backup files are not needed,
167-
# because we have git ;-)
104+
# Backup & report files from converting an old project file to a newer
105+
# Visual Studio version. Backup files are not needed, because we have git ;-)
168106
_UpgradeReport_Files/
169107
Backup*/
170108
UpgradeLog*.XML
171-
UpgradeLog*.htm
172-
173-
# SQL Server files
174-
*.mdf
175-
*.ldf
176109

177-
# Business Intelligence projects
178-
*.rdl.data
179-
*.bim.layout
180-
*.bim_*.settings
110+
ComponentStore/
111+
lib/
181112

182-
# Microsoft Fakes
183-
FakesAssemblies/
113+
*.DS_Store
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Additions allow you to add arbitrary C# to the generated classes
2+
before they are compiled. This can be helpful for providing convenience
3+
methods or adding pure C# classes.
4+
5+
== Adding Methods to Generated Classes ==
6+
7+
Let's say the library being bound has a Rectangle class with a constructor
8+
that takes an x and y position, and a width and length size. It will look like
9+
this:
10+
11+
public partial class Rectangle
12+
{
13+
public Rectangle (int x, int y, int width, int height)
14+
{
15+
// JNI bindings
16+
}
17+
}
18+
19+
Imagine we want to add a constructor to this class that takes a Point and
20+
Size structure instead of 4 ints. We can add a new file called Rectangle.cs
21+
with a partial class containing our new method:
22+
23+
public partial class Rectangle
24+
{
25+
public Rectangle (Point location, Size size) :
26+
this (location.X, location.Y, size.Width, size.Height)
27+
{
28+
}
29+
}
30+
31+
At compile time, the additions class will be added to the generated class
32+
and the final assembly will a Rectangle class with both constructors.
33+
34+
35+
== Adding C# Classes ==
36+
37+
Another thing that can be done is adding fully C# managed classes to the
38+
generated library. In the above example, let's assume that there isn't a
39+
Point class available in Java or our library. The one we create doesn't need
40+
to interact with Java, so we'll create it like a normal class in C#.
41+
42+
By adding a Point.cs file with this class, it will end up in the binding library:
43+
44+
public class Point
45+
{
46+
public int X { get; set; }
47+
public int Y { get; set; }
48+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
7+
<ProjectGuid>{794FF0AF-2F19-4627-9697-52DF1375EABD}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<RootNamespace>AndroidAltBeaconLibrary</RootNamespace>
10+
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
11+
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
12+
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
13+
<AssemblyName>AndroidAltBeaconLibrary</AssemblyName>
14+
<TargetFrameworkVersion>v4.4</TargetFrameworkVersion>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug</OutputPath>
21+
<DefineConstants>DEBUG;</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
<AndroidLinkMode>None</AndroidLinkMode>
25+
<ConsolePause>false</ConsolePause>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<DebugType>full</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release</OutputPath>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
34+
<ConsolePause>false</ConsolePause>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="System" />
38+
<Reference Include="System.Xml" />
39+
<Reference Include="System.Core" />
40+
<Reference Include="Mono.Android" />
41+
</ItemGroup>
42+
<ItemGroup>
43+
<Compile Include="Properties\AssemblyInfo.cs" />
44+
<Compile Include="ModelSpecificDistanceUpdater.cs" />
45+
</ItemGroup>
46+
<ItemGroup>
47+
<None Include="Additions\AboutAdditions.txt" />
48+
<None Include="Jars\AboutJars.txt" />
49+
</ItemGroup>
50+
<ItemGroup>
51+
<TransformFile Include="Transforms\EnumFields.xml" />
52+
<TransformFile Include="Transforms\EnumMethods.xml" />
53+
<TransformFile Include="Transforms\Metadata.xml" />
54+
</ItemGroup>
55+
<Import Project="$(MSBuildExtensionsPath)\Novell\Xamarin.Android.Bindings.targets" />
56+
<ItemGroup>
57+
<LibraryProjectZip Include="Jars\android-beacon-library-2.0.aar" />
58+
</ItemGroup>
59+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidAltBeaconLibrary", "AndroidAltBeaconLibrary.csproj", "{794FF0AF-2F19-4627-9697-52DF1375EABD}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{794FF0AF-2F19-4627-9697-52DF1375EABD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{794FF0AF-2F19-4627-9697-52DF1375EABD}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{794FF0AF-2F19-4627-9697-52DF1375EABD}.Release|Any CPU.ActiveCfg = Release|Any CPU
15+
{794FF0AF-2F19-4627-9697-52DF1375EABD}.Release|Any CPU.Build.0 = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(MonoDevelopProperties) = preSolution
18+
StartupItem = AndroidAltBeaconLibrary.csproj
19+
EndGlobalSection
20+
EndGlobal
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Properties>
2+
<MonoDevelop.Ide.Workspace ActiveConfiguration="Release" PreferredExecutionTarget="Android.92a4398e" />
3+
<MonoDevelop.Ide.Workbench ActiveDocument="ModelSpecificDistanceUpdater.cs">
4+
<Files>
5+
<File FileName="ModelSpecificDistanceUpdater.cs" Line="12" Column="12" />
6+
</Files>
7+
</MonoDevelop.Ide.Workbench>
8+
<MonoDevelop.Ide.DebuggingService.Breakpoints>
9+
<BreakpointStore>
10+
<Breakpoint file="/Users/chrisriesgo/Projects/GitHub/Xamarin-Android-Beacon-Library-Reference/AndroidBeaconLibraryReference/MainActivity.cs" line="144" column="1" />
11+
<Breakpoint file="/Users/chrisriesgo/Projects/GitHub/Xamarin-Android-Beacon-Library-Reference/AndroidBeaconLibraryReference/MainActivity.cs" line="186" column="37" />
12+
</BreakpointStore>
13+
</MonoDevelop.Ide.DebuggingService.Breakpoints>
14+
<MonoDevelop.Ide.DebuggingService.PinnedWatches>
15+
<Watch file="../../../../Downloads/leankit-mobile/LeanKit.iOS/Renderers/CustomEditorRenderer.cs" line="77" offsetX="582" offsetY="1596" expression="Control" liveUpdate="False" />
16+
<Watch file="../../../../Downloads/leankit-mobile/LeanKit.Forms/Services/UserLoginService.cs" line="129" offsetX="441" offsetY="2226" expression="ex" liveUpdate="False" />
17+
</MonoDevelop.Ide.DebuggingService.PinnedWatches>
18+
</Properties>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
This directory is for Android .jars.
2+
3+
There are 4 types of jars that are supported:
4+
5+
== Input Jar and Embedded Jar ==
6+
7+
This is the jar that bindings should be generated for.
8+
9+
For example, if you were binding the Google Maps library, this would
10+
be Google's "maps.jar".
11+
12+
The difference between EmbeddedJar and InputJar is, EmbeddedJar is to be
13+
embedded in the resulting dll as EmbeddedResource, while InputJar is not.
14+
There are couple of reasons you wouldn't like to embed the target jar
15+
in your dll (the ones that could be internally loaded by <uses-library>
16+
feature e.g. maps.jar, or you cannot embed jars that are under some
17+
proprietary license).
18+
19+
Set the build action for these jars in the properties page to "InputJar".
20+
21+
22+
== Reference Jar and Embedded Reference Jar ==
23+
24+
These are jars that are referenced by the input jar. C# bindings will
25+
not be created for these jars. These jars will be used to resolve
26+
types used by the input jar.
27+
28+
NOTE: Do not add "android.jar" as a reference jar. It will be added automatically
29+
based on the Target Framework selected.
30+
31+
Set the build action for these jars in the properties page to "ReferenceJar".
32+
33+
"EmbeddedJar" works like "ReferenceJar", but like "EmbeddedJar", it is
34+
embedded in your dll. But at application build time, they are not included
35+
in the final apk, like ReferenceJar files.
36+
37+
85.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)