Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios course #3

Open
wants to merge 797 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
797 commits
Select commit Hold shift + click to select a range
d58b6ec
[MFA] MonoDroid MediaPickerSample.sln
ermau Oct 23, 2012
406392e
[WinRT] Add Contact types
ermau Oct 23, 2012
fa16631
Remove Account class, shouldn't have been there
ermau Oct 23, 2012
4080f26
[iOS] Fix MediaPicker.Pick* for some UIs (#7928)
ermau Oct 23, 2012
97c1267
Fix tabs
ermau Oct 23, 2012
e730acf
[iOS] Fix MediaPicker.Pick* on retina iPads (#7954)
ermau Oct 23, 2012
31a6f62
[iOS] Fix MediaPicker iPad rotation bug on iOS 6
ermau Oct 23, 2012
20befcf
[iOS] .. and respect ShouldAutorotate()
ermau Oct 23, 2012
44d5466
[iOS] Link AssemblyInfo from MFA
ermau Oct 24, 2012
0719672
[MFA] Possible fix for front-only cameras in Media
ermau Oct 26, 2012
f24cb70
Commit designer version changes, annoying
ermau Oct 26, 2012
b5d8ecb
[WinRT] Fix sample references
ermau Oct 29, 2012
3d9c711
Update license version
ermau Oct 29, 2012
143c4d0
Update readme
ermau Oct 29, 2012
629b39e
Fix Geolocator ctor version docs
ermau Oct 29, 2012
e0b51b4
[WP8] Fix sample refs
ermau Oct 29, 2012
728a8a6
[WinRT] Don't link sample content
ermau Oct 30, 2012
21c89d3
[WinRT] Add Samples.sln
ermau Oct 30, 2012
83d5260
[WinRT] Fixed some Geolocation issues
ermau Oct 30, 2012
acacdf5
[MFA] Make sample names nicer
ermau Nov 13, 2012
40b3819
Fix MonoDroid/sln
ermau Nov 13, 2012
785ffef
Add license in markdown
ermau Nov 13, 2012
c4bc38a
[iOS] Pretty up sln/csproj names
ermau Nov 13, 2012
280df13
[Android] Improve sln/csproj naming
ermau Nov 13, 2012
c63e536
Cleanup Windows sln
ermau Nov 13, 2012
e50d856
Fix LICENSE.md
ermau Nov 15, 2012
fabfbcc
Doc tree is generated, shouldn't be part of repo
ermau Nov 15, 2012
29fb261
Check for null labels, should fix #8662
ermau Nov 29, 2012
8d6ced8
Search a little harder for a UIViewController
ermau Nov 29, 2012
15a5964
Add Details.md and GettingStarted.md
ermau Dec 10, 2012
484275c
Wrap lines for easier copyediting.
dvdsgl Dec 10, 2012
f3c4fb2
Simpler explanation of Xamarin.Mobile.
dvdsgl Dec 10, 2012
2066f79
GettingStarted document shouldn't actually start with "Getting Started".
dvdsgl Dec 10, 2012
61ae461
Use fenced code blocks instead of "[code]" delimeters.
dvdsgl Dec 10, 2012
ebc9849
Normalize examples, and phrase them in terms of use cases rather than…
dvdsgl Dec 10, 2012
cf7def7
Tried to make code formatting neater.
dvdsgl Dec 10, 2012
278c886
Remove newline from code example
dvdsgl Dec 10, 2012
54776ae
Remove same newline from duplicate example in other document.
dvdsgl Dec 10, 2012
dac7d52
Merge pull request #1 from xamarin/copyedit
ermau Dec 10, 2012
96947c6
[MFA] Throw real exception on storage failure
ermau Dec 10, 2012
bb9ecf1
[MFA] Throw ANE on null context in ctor
ermau Dec 10, 2012
7a2a29e
Update version to 0.6.1
ermau Dec 10, 2012
0bd8627
Move AssemblyInfo to right place
ermau Dec 10, 2012
da928d7
Update readme
ermau Dec 10, 2012
613b0fb
Add Windows Phone sample sln
ermau Dec 17, 2012
c9a3d5c
.sln cleanup
ermau Dec 11, 2012
37ddbc1
Add docs/.source
ermau Dec 11, 2012
217a993
Add screenshot
dvdsgl Feb 5, 2013
096884d
Add component parts
ermau Feb 5, 2013
0ddc138
Fix android sample deploy
ermau Feb 5, 2013
b537ad9
Placeholder icon
dvdsgl Feb 5, 2013
138d560
Add usings
ermau Feb 5, 2013
630b67f
Slightly improved icon
dvdsgl Feb 6, 2013
4ac1818
Bojan wants some blue
dvdsgl Feb 6, 2013
eb39d5c
Fix the .sources file for docs.
bojanrajkovic Feb 6, 2013
97c26da
Fix snippet issues
ermau Feb 6, 2013
bd6f57b
Don't include WP in component for now
ermau Feb 6, 2013
a6cd044
Include permissions in GettingStarted
ermau Feb 6, 2013
d060848
Fix GettingStarted
ermau Feb 6, 2013
f2993a5
[Android] Fix some devices taking photos/videos
ermau Feb 14, 2013
d6dbee8
Cleanup dead code
ermau Feb 17, 2013
fe8c13d
Delete touched file before we move
ermau Feb 17, 2013
f057055
General code cleanup
ermau Feb 18, 2013
dddfe1d
[Android] Fix possible NRE
ermau Feb 18, 2013
9f930b9
And: Only handle content uris with ContentResolver
ermau Feb 18, 2013
ce092ff
Add MediaFileNotFoundException
ermau Feb 18, 2013
99fa6ca
And: Consolidate file from uri logic
ermau Feb 18, 2013
cf72912
And: Further file checks in MediaPicekr
ermau Feb 18, 2013
4ebcb0b
Add some comments
ermau Feb 18, 2013
7929827
Handle photos from things like Picasa
ermau Feb 18, 2013
51a60b6
Fix OOME in Android MediaPicker sample
ermau Feb 18, 2013
d3f116d
Asyncify android MediaPicker internals
ermau Feb 18, 2013
c2cbf71
Remove dead code
ermau Feb 18, 2013
16249c0
Simplify stream copy
ermau Feb 18, 2013
8c69c15
Don't callback until we dismiss our controllers
ermau Feb 18, 2013
81f6ae0
Use existing filename for copying
ermau Feb 18, 2013
ac85ec1
Shiny new iOS MediaPicker sample
ermau Feb 18, 2013
b39e1ec
Cleanup copied files in Pick* on iOS
ermau Feb 18, 2013
897010e
Put temp media in /temp on iOS like WP
ermau Feb 18, 2013
966133a
Put copied files in /temp like iOS/WP
ermau Feb 18, 2013
6417476
Cleanup for taking pictures too
ermau Feb 18, 2013
c6b6459
Don't dispose the video for now
ermau Feb 18, 2013
c91bbc5
MediaPicker sample cleanup
ermau Feb 18, 2013
c474e1f
Add known issues to readme
ermau Feb 18, 2013
e41fb1f
Bump version
ermau Feb 18, 2013
f0e3b98
Clarify MediaPicker.Pick* behavior in docs
ermau Feb 18, 2013
cff9f4d
Set MediaPicker sample target API level
ermau Feb 18, 2013
c5dbad5
Update docs
ermau Feb 18, 2013
9a8a6db
More docs updates
ermau Feb 18, 2013
9e24bac
Update licenses
ermau Feb 18, 2013
d55e17f
Revert some plist changes in MediaPicker sample
ermau Feb 18, 2013
c93a620
Catch FNFE when falling back on media
ermau Feb 18, 2013
4ed8b6f
Fix target framework for android samples
ermau Feb 18, 2013
e3edfd0
Remove dead code
ermau Feb 18, 2013
83a6fda
Simplify stream copy
ermau Feb 18, 2013
a5f8786
Don't callback until we dismiss our controllers
ermau Feb 18, 2013
c4f75c4
Add known issues to readme
ermau Feb 18, 2013
4067237
Update licenses
ermau Feb 18, 2013
0cd0cba
Set MediaPicker sample target API level
ermau Feb 18, 2013
7be6183
Fix target framework for android samples
ermau Feb 18, 2013
4cc1c65
Release notes
ermau Feb 18, 2013
6cf1676
Bump AssemblyInfo
ermau Feb 18, 2013
a0d2086
Add WP8/W8 to makepkg
ermau Feb 20, 2013
9281d47
Fix missing comma in makepkg.py.
Feb 20, 2013
6fe6ca7
Rename sample solutions for WP8/W8
ermau Feb 20, 2013
4169366
Merge 0.6.2
ermau Feb 20, 2013
facebb2
Add iOS to Windows SLN
ermau Feb 20, 2013
57898eb
Bump versions
ermau Feb 20, 2013
b41cd3c
--sample-no-manifest the windows samples
ermau Feb 20, 2013
65e0046
Cleanup iOS contacts sample
ermau Feb 21, 2013
1ceea2a
Update designer file
ermau Feb 22, 2013
77dba93
Safety for null cursors in contacts
ermau Feb 22, 2013
11896b3
Unique contact protection on android
ermau Feb 22, 2013
3fb02a3
More null cursor protection
ermau Feb 22, 2013
36b0d36
Fix Details snippets
ermau Feb 22, 2013
128f672
Fix android != queries
ermau Feb 22, 2013
cbbf81f
Simplify ContactReader
ermau Feb 23, 2013
85dafaf
Moar null cursor safety
ermau Feb 23, 2013
f470411
Cleanup Android contacts sample
ermau Feb 23, 2013
29e9eeb
Don't use query string for a sort
ermau Feb 23, 2013
133ccd9
Add known issues to Details
ermau Mar 14, 2013
85f16e6
Add/update platform slns
ermau Mar 14, 2013
de09927
[iOS] Use new launcher imgs for MediaPicker sample
ermau Mar 14, 2013
e53d547
Update those pesky designer files
ermau Mar 14, 2013
116d213
Clarify android task issue
ermau Mar 14, 2013
6b2edfd
[AD] Fix missing reference on MP sample
ermau Mar 14, 2013
956c54c
Update icon names
ermau Mar 14, 2013
242a2b8
Make Details/GettingStarted consistent
ermau Mar 14, 2013
ec3b837
[AD] Revamp MediaPicker sample
ermau Mar 15, 2013
a817394
Add change note
ermau Mar 15, 2013
00dab6b
[AD] Add missing sample activities
ermau Mar 15, 2013
9249385
Remove some dead code
ermau Mar 28, 2013
bea3eb6
Bump version
ermau Apr 4, 2013
17caa3d
[AD] Add internal distinction for obseleted API
ermau Apr 4, 2013
9768c77
[AD] Android specific MediaFile implementation
ermau Apr 4, 2013
5070d3a
[AD] Implement new MediaPicker API for #2
ermau Apr 4, 2013
d55c0eb
[AD] Update sample with new API
ermau Apr 4, 2013
121bc5a
[iOS] Add Get*UI MediaPicker methods for #2
ermau Apr 4, 2013
4ff9e65
[iOS] Update MediaPicker sample to use new API
ermau Apr 4, 2013
2ef9fbf
Add relevant files to SLN
ermau Apr 4, 2013
dec14bc
Update Details/GettingStarted with new MediaPicker API
ermau Apr 4, 2013
98b3c98
Fix/Improve GettingStarted and Details
ermau Apr 5, 2013
dc05e76
[AD] Don't pass 0 for timeout in GetPositionAsync
ermau Apr 23, 2013
ea33078
[AD] Yield contacts in original ID order batching
ermau Jun 4, 2013
f40105c
[iOS] Update csproj targets
ermau Jun 5, 2013
b53dfe2
Add missing MediaPickerController
ermau Jun 5, 2013
d4a886f
Fix Position ctor (fixes #8)
ermau Jun 6, 2013
3734ad1
[Docs] Add 0.7 stubs
ermau Jun 17, 2013
f1ef43f
[Docs] Revert formatting
ermau Jun 17, 2013
ebd8f28
Add checks to GetMediaFileExtraAsync
ermau Jun 17, 2013
c6abb25
[Docs] Docs for new APIs and some fixes
ermau Jun 19, 2013
475cd73
[Docs] Re-add blank remarks, formatting
ermau Jun 19, 2013
859c906
Bump version in license.md
ermau Jul 18, 2013
2dfaf86
Update SLN
ermau Jul 18, 2013
e8b6771
Add missing MediaPickerController docs
ermau Jul 18, 2013
0887fd2
Update license
ermau Jul 18, 2013
8584a87
Bit of cleanup
ermau Jul 18, 2013
3a07331
Clarify samples
ermau Jul 19, 2013
7bab46c
Merge branch 'open-source'
ermau Jul 19, 2013
a2971f5
Fix GetMediaFileExtraAsync check
ermau Jul 19, 2013
329e803
Add some missing license headers
ermau Jul 19, 2013
7f483b8
Update sample references
ermau Jul 19, 2013
a1ad3b1
Remove dead code
ermau Jul 19, 2013
1bfc2d2
Remove old license and code/samples share Apache 2
ermau Jul 19, 2013
caf131c
Satisfy XS
ermau Jul 19, 2013
6e549ba
Fix Android SLN
ermau Jul 20, 2013
2f5b063
Use Details for new readme base
ermau Jul 24, 2013
cc1bb17
sln fixed.
ignaciofuentes Jul 25, 2013
da95273
Merge pull request #9 from ignaciofuentes/correcting-sln
ermau Jul 25, 2013
5a01929
Replaced AsyncCtpLibrary with Microsoft.Bcl.Async library
Jul 26, 2013
fc046ad
Fixed crash when using camera since options was defaulted to null
ghigh Aug 16, 2013
fc1ded1
Filled out property for AltitudeAccuracy in iOS
nberardi Aug 16, 2013
deb14c8
Don't wait for heading information if it hasn't been requested
bjdodson Aug 28, 2013
bb6e2e0
Merge pull request #15 from MobiSocialInc/master
ermau Aug 28, 2013
1180a5a
Merge pull request #13 from nberardi/patch-1
ermau Aug 28, 2013
bbf4ef9
Merge pull request #14 from gerryhigh/master
ermau Aug 28, 2013
75e84c6
Merge pull request #10 from jmezach/master
ermau Aug 30, 2013
52f4f01
Update gitignore
ermau Aug 30, 2013
b60b763
Add NuGet
ermau Aug 30, 2013
6a06cc3
[WP] Fix .targets import
ermau Aug 30, 2013
c4cd189
[WP] Enable package restore
ermau Aug 30, 2013
33b973a
[WP] Fix and update package references
ermau Aug 30, 2013
ec12f60
Move component building to yaml
ermau Sep 4, 2013
38bb30d
Fix yaml
ermau Sep 4, 2013
1f9a55a
Fix yaml
ermau Sep 4, 2013
50fd59e
Update details/readme
ermau Sep 9, 2013
eed7b38
Update library tags
ermau Sep 9, 2013
163f297
[AD] Avoid async query to get thumbnail data
ermau Sep 10, 2013
0c0b70e
[AD] Fix taking photos on Xperia devices
ermau Dec 2, 2013
285a3fc
[iOS] Follow guidance on taking photos for iPad
ermau Dec 6, 2013
3f32d91
[iOS] Set MP sample universal and name/identifier
ermau Dec 6, 2013
ca26098
[iOS] Fix MP sample title bar
ermau Dec 6, 2013
e44fbad
[iOS] Rename TakeMedia to more apt GetMediaAsync
ermau Dec 6, 2013
eed0dc1
Merge branch 'fix-xperia-mediapicker'
ermau Dec 6, 2013
4dad9e5
[AD] Fix path comparison
ermau Dec 9, 2013
be587b3
[AD] Specify EXTRA_OUTPUT for videos too
ermau Dec 9, 2013
0a2248b
Bump version
ermau Dec 10, 2013
fd2bb22
[iOS] Set name/bundle for samples
ermau Dec 11, 2013
0b523b7
[iOS] Add startup images for contacts sample
ermau Dec 12, 2013
3f4730c
[iOS] Add startup images for Geolocation sample
ermau Dec 12, 2013
94a695e
better support for non-standard ContentProviders
bjdodson Dec 20, 2013
4d9c16d
[AD] Add initial set of Android Contacts provider tests
ermau Jan 20, 2014
3b43ca5
Let Query<T> handle a null execution return
ermau Jan 20, 2014
fa9d652
Remove unused column list
ermau Jan 20, 2014
1e3c35f
[AD] Improve content query translator
ermau Jan 20, 2014
186bc54
[Tests] Add query test for || with different mimetypes
ermau Jan 21, 2014
c396bd8
[AD] Only do partial fallbacks on AndAlso conditions
ermau Jan 21, 2014
60d2400
iOS Unified API support with samples
Redth Sep 19, 2014
da96afb
Updated Component Packaging for iOS Unified support
Redth Sep 19, 2014
5075601
Fixed iOS8 CLLocationManager request for authorization
Redth Sep 23, 2014
616b9cb
Made RequestAuthorization private, fixed spacing
Redth Sep 23, 2014
3f16635
Generate .xml files for iOS projects
Redth Sep 23, 2014
c993d73
Fixed IsGeolocationEnabled for iOS8
Redth Sep 24, 2014
8f68fbf
Added ABI's for Android Samples (required for Component Store approval)
Redth Sep 24, 2014
594456b
Updating the sample for UIActionSheet changes in iOS 8.
bholmes Sep 30, 2014
6d9db87
Add more Instant Messaging services
Redth Dec 17, 2014
a54de91
Fix iOS Geolocation Samples to move buttons down on UI
Redth Dec 17, 2014
d3e779e
Updated iOS Unified samples to target 5.2+
Redth Dec 17, 2014
7cb471f
Copied fixed iOS8 action sheet changes from unified sample project to…
Redth Dec 17, 2014
9e549d4
Updates for API changes in Unified API in Xamarin.iOS 8.6+
Redth Dec 17, 2014
e08b845
Removed WP7 related projects from Solution
Redth Dec 17, 2014
6af592a
Ignore packages/ folder
Redth Dec 17, 2014
c6b08ee
Remove WP7 related items from component packaging
Redth Dec 17, 2014
e934561
Fix component lib paths
Redth Dec 17, 2014
7aa3f24
Update SinglePositionListener.cs
thomasgalliker Jan 2, 2015
90e3a23
Merge pull request #36 from xamarin/ios-unified-support
bholmes Jun 4, 2015
8fb860f
Handling the case where the id is not in the map.
bholmes Jun 8, 2015
c860d16
Fixing exceptions when the query string is appended to
bholmes Jun 8, 2015
ee483b1
Fully qualifying the AddressBook name in our sample code.
bholmes Jun 8, 2015
8e5bcf4
Merge pull request #47 from xamarin/bugs-2015-06-08
bholmes Jun 9, 2015
cc7f1df
Fix for Android 5.1.1 image picking #48
jamesmontemagno Aug 25, 2015
78cffa8
Save out and re-set the StatusBarColor
jamesmontemagno Aug 25, 2015
96ab073
Reset the TaskCompletionSource on Dismiss to the picker instance can …
Sep 10, 2015
40621af
Merge pull request #24 from bjdodson/master
Redth Sep 24, 2015
8c4d42f
Merge branch 'android-5-1-1-fixes'
Redth Sep 24, 2015
56fdd41
Merge pull request #42 from thomasgalliker/patch-1
Redth Sep 24, 2015
98d8e4e
Merge pull request #50 from xamarin/ios-status-bar-fix
Redth Sep 24, 2015
39519f2
Merge pull request #51 from DennisWelu/master
Redth Sep 24, 2015
25a3689
iOS: Only throw in PickerViewController.set_Delegate if not null
Redth Sep 24, 2015
7e62cac
iOS: Fix a warning about an unused reference
Redth Sep 24, 2015
3971dd3
Added cake.build script
Redth Sep 24, 2015
acacfb8
Update expired certs for RT samples
Redth Sep 29, 2015
dff2b47
Updated build scripts
Redth Sep 29, 2015
6bbf811
Bump component version
Redth Sep 29, 2015
fda9bb1
Fixed paths to copy wp8 and winrt output from
Redth Sep 30, 2015
3115495
Zip output after build
Redth Sep 30, 2015
a9c220d
Add zip target to build script
Redth Sep 30, 2015
5429de9
Renamed output zip file and delete if exists
Redth Sep 30, 2015
c91df9d
Fixing cake scripts for OSX builds
bholmes Oct 1, 2015
98f49fa
Updated sample certs to use no password for CI
Redth Oct 1, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
bin
Bin
obj
packages
TestResults
.DS_Store
_ReSharper.*
Expand All @@ -13,4 +14,8 @@ _ReSharper.*
*~
*.swp
*.pidb
*.userprefs
*.userprefs
*.dotCover
*.user
*.ide
*.DotSettings
6 changes: 6 additions & 0 deletions .nuget/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
Binary file added .nuget/NuGet.exe
Binary file not shown.
136 changes: 136 additions & 0 deletions .nuget/NuGet.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>

<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>

<!-- Property that enables building a package from a project -->
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>

<!-- Determines if package restore consent is required to restore packages -->
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>

<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
</PropertyGroup>

<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
<!--
<PackageSource Include="https://www.nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
</ItemGroup>

<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
</PropertyGroup>

<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
<PackagesConfig>packages.config</PackagesConfig>
</PropertyGroup>

<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>

<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>

<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>

<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>

<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>

<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>

<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>

<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>

<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
<!--
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
This effectively acts as a lock that makes sure that the download operation will only happen once and all
parallel builds will have to wait for it to complete.
-->
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
</Target>

<Target Name="_DownloadNuGet">
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
</Target>

<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />

<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>

<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />

<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>

<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Net" />
<Using Namespace="Microsoft.Build.Framework" />
<Using Namespace="Microsoft.Build.Utilities" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
OutputFilename = Path.GetFullPath(OutputFilename);

Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);

return true;
}
catch (Exception ex) {
Log.LogErrorFromException(ex);
return false;
}
]]>
</Code>
</Task>
</UsingTask>
</Project>
107 changes: 107 additions & 0 deletions Details.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
Xamarin.Mobile is an API for accessing common platform features, such as
reading the user's address book and using the camera, across iOS,
Android, and Windows Phone.

The goal of Xamarin.Mobile is to decrease the amount of
platform-specific code needed to perform common tasks in multiplatform
apps, making development simpler and faster.

Xamarin.Mobile is currently a preview release and is subject to API
changes.

**Note:** The Windows Phone 7.1 version of the library requires the
Microsoft.Bcl.Async NuGet package. You'll need to restore this package
to use the samples or download this package to any WP7 app using
Xamarin.Mobile.

## Examples

To access the address book (requires `READ_CONTACTS` permissions
on Android):

```csharp
using Xamarin.Contacts;
// ...

var book = new Xamarin.Contacts.AddressBook ();
// new AddressBook (this); on Android
if (!await book.RequestPermission()) {
Console.WriteLine ("Permission denied by user or manifest");
return;
}

foreach (Contact contact in book.OrderBy (c => c.LastName)) {
Console.WriteLine ("{0} {1}", contact.FirstName, contact.LastName);
}
```

To get the user's location (requires `ACCESS_COARSE_LOCATION` and
`ACCESS_FINE_LOCATION` permissions on Android):

```csharp
using Xamarin.Geolocation;
// ...

var locator = new Geolocator { DesiredAccuracy = 50 };
// new Geolocator (this) { ... }; on Android

Position position = await locator.GetPositionAsync (timeout: 10000);

Console.WriteLine ("Position Status: {0}", position.Timestamp);
Console.WriteLine ("Position Latitude: {0}", position.Latitude);
Console.WriteLine ("Position Longitude: {0}", position.Longitude);
```

To take a photo:

```csharp
using Xamarin.Media;
// ...

var picker = new MediaPicker ();
if (!picker.IsCameraAvailable)
Console.WriteLine ("No camera!");
else {
try {
MediaFile file = await picker.TakePhotoAsync (new StoreCameraMediaOptions {
Name = "test.jpg",
Directory = "MediaPickerSample"
});

Console.WriteLine (file.Path);
} catch (OperationCanceledException) {
Console.WriteLine ("Canceled");
}
}
```

On Android (requires `WRITE_EXTERNAL_STORAGE` permissions):

```csharp
using Xamarin.Media;
// ...

protected override void OnCreate (Bundle bundle)
{
var picker = new MediaPicker (this);
if (!picker.IsCameraAvailable)
Console.WriteLine ("No camera!");
else {
var intent = picker.GetTakePhotoUI (new StoreCameraMediaOptions {
Name = "test.jpg",
Directory = "MediaPickerSample"
});
StartActivityForResult (intent, 1);
}
}

protected override async void OnActivityResult (int requestCode, Result resultCode, Intent data)
{
// User canceled
if (resultCode == Result.Canceled)
return;

MediaFile file = await data.GetMediaFileExtraAsync (this);
Console.WriteLine (file.Path);
}
```
123 changes: 123 additions & 0 deletions GettingStarted.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
## Examples

### Contacts
To access the address book (requires `READ_CONTACTS` permissions
on Android):

```csharp
using Xamarin.Contacts;
// ...

var book = new Xamarin.Contacts.AddressBook ();
book.RequestPermission().ContinueWith (t => {
if (!t.Result) {
Console.WriteLine ("Permission denied by user or manifest");
return;
}

foreach (Contact contact in book.OrderBy (c => c.LastName)) {
Console.WriteLine ("{0} {1}", contact.FirstName, contact.LastName);
}
}, TaskScheduler.FromCurrentSynchronizationContext());
```

### Geolocation

To get the user's location (requires `ACCESS_COARSE_LOCATION` and
`ACCESS_FINE_LOCATION` permissions on Android):

```csharp
using Xamarin.Geolocation;
// ...

var locator = new Geolocator { DesiredAccuracy = 50 };
// new Geolocator (this) { ... }; on Android
locator.GetPositionAsync (timeout: 10000).ContinueWith (t => {
Console.WriteLine ("Position Status: {0}", t.Result.Timestamp);
Console.WriteLine ("Position Latitude: {0}", t.Result.Latitude);
Console.WriteLine ("Position Longitude: {0}", t.Result.Longitude);
}, TaskScheduler.FromCurrentSynchronizationContext());
```

NOTE: On iOS 8.0+ you must set either `NSLocationWhenInUseUsageDescription` or `NSLocationAlwaysUsageDescription` in your `Info.plist` file so that Xamarin.Mobile will request the appropriate permission from the user.

### Media

`MediaPicker` allows you to invoke the native UI to take or select photos or video. Given
that there is this UI interaction, the code (while simpler than doing it manually) will not
be completely cross-platform.

To take a photo on iOS, Windows Phone or WinRT:

```csharp
using Xamarin.Media;
// ...

var picker = new MediaPicker();
picker.PickPhotoAsync().ContinueWith (t => {
MediaFile file = t.Result;
Console.WriteLine (file.Path);
}, TaskScheduler.FromCurrentSynchronizationContext());
```

On Android and optionally on iOS, you control the UI.

To take a photo on Android (requires `WRITE_EXTERNAL_STORAGE` permissions):

```csharp
using Xamarin.Media;
// ...

protected override void OnCreate (Bundle bundle)
{
var picker = new MediaPicker (this);
if (!picker.IsCameraAvailable)
Console.WriteLine ("No camera!");
else {
var intent = picker.GetTakePhotoUI (new StoreCameraMediaOptions {
Name = "test.jpg",
Directory = "MediaPickerSample"
});
StartActivityForResult (intent, 1);
}
}

protected override void OnActivityResult (int requestCode, Result resultCode, Intent data)
{
// User canceled
if (resultCode == Result.Canceled)
return;

data.GetMediaFileExtraAsync (this).ContinueWith (t => {
Console.WriteLine (t.Result.Path);
}, TaskScheduler.FromCurrentSynchronizationContext());
}
```

To take a photo on iOS controlling the UI:

```csharp
using Xamarin.Media;
// ...

var picker = new MediaPicker();
MediaPickerController controller = picker.GetTakePhotoUI (new StoreCameraMediaOptions {
Name = "test.jpg",
Directory = "MediaPickerSample"
});

// On iPad, you'll use UIPopoverController to present the controller
PresentViewController (controller, true, null);

controller.GetResultAsync().ContinueWith (t => {
// Dismiss the UI yourself
controller.DismissViewController (true, () => {
MediaFile file = t.Result;
});

}, TaskScheduler.FromCurrentSynchronizationContext());
```
#####Note to iOS 8 Developers
Showing a `MediaPicker` in response to a `UIActionSheet.Clicked` event will cause unexpected behavior on iOS 8. Apps should be updated to conditionally use an `UIAlertController` with a style of `UIAlertControllerStyle.ActionSheet.` See the iOS sample for more info.


Loading