Sunday, September 14, 2014

Binding Google Play Services

Binding Google Play Services

Once the Google Play Services client library is installed, it must be bound by a Xamarin.Android Java binding library. There are two ways to accomplish this:
  • Use the Google Play Services component - This is the simplest approach and is only available starting with Xamarin.Android 4.8 or higher. Simply install the Google Play Services component . This document will focus on this approach.
  • Manually bind the Google Play Services client library - This is a more complex approach and is the only way for Xamarin.Android 4.4 or Xamarin.Android 4.6 to bind the Google Play Services SDK. Manually binding the Google Play Services client library is beyond the scope of this document, but an example of how to do so may be found in the Maps and Location Demo v2 sample on Github.
https://github.com/xamarin/monodroid-samples/tree/master/MapsAndLocationDemo_v2

Nuget Package
Install-Package Xamarin.GooglePlayServices


Saturday, September 13, 2014

Fixing Nuget problem

Sometimes when the app is compiling, it looks for nuget package required for that app and you might possible get ends with the following errors

Warning 2 This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\Xamarin.Forms.1.1.1.6206\build\portable-win+net45+wp80+MonoAndroid10+MonoTouch10\Xamarin.Forms.targets. C:\Users\thetnswe\Dropbox\JoyDash Technologies\AppstoreProject\Resources\xamarin-forms-samples-master\xamarin-forms-samples-master\MobileCRM\MobileCRM.iOS\MobileCRM.iOS.csproj 183 5 MobileCRM.iOS


Error 3 NuGet Package restore failed for project MobileCRM.Android: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.. 0 0

Solving that problem is quite easy as you might have downloaded the sample app to complicated directory structure. Just move your whole project to C:/Xamarin/[YourProject] and recompile it. It will solve the problem..

Good Luck Coding :)