portable-class-library

How to store the Local image path in sqlite or xml database in Xamrin.Forms

喜你入骨 提交于 2019-12-12 04:55:55
问题 I have given task to store the image path in database either xml schema or sqlite database.I am working on Xamarin.Forms PCL project. I am very confused with how to store image path in database.because in android image should be placed in Ressource/drawble,ios image placed in Resources folder. I read this xamarin.forms documentaion. But not getting how to get path and store in database. Please anyone provide any resources or example. 回答1: Hope you have gone through this documentation and to

How to use Couchbase.Lite-PCL in a Xamarin Forms project?

假如想象 提交于 2019-12-12 03:43:45
问题 I see there's a Couchbase.Lite-PCL in nuget which has been published recently. Is this capable of running in the PCL? Anyone knows how to make it work? I couldn't find any documentation on this. 回答1: It is not an official NuGet package, so your milage may vary. It does have the dll's in a portable folder, and the dll's are added fine to a PCL and the project seems to build. Try it it, it might work fine, but don't expect any direct support from the couchbase people. Alternatively you could

SQLite database connection error Xamarin forms pcl

北战南征 提交于 2019-12-12 02:13:01
问题 I have a problem with the inclusion of a SQLite database in Xamarin forms pcl. Related to iOS. Reading the guide on the official site tells me to put it into Library / Databases, but I can not make access. It does not connect. Instead of Android works. my error: SQLite.SQLiteException: Could not open database file: /Users/my-user/Library/Developer/CoreSimulator/Devices/51FE586C-FA4D-4B13-BE27-5E3AF8D2A51E/data/Containers/Data/Application/82A0DF5E-229F-4E4A-9A7D-25099D130AA6/Documents/Library

Unable to add ZXing.Net.Mobile package to my Xamarin.Forms project

对着背影说爱祢 提交于 2019-12-12 01:56:56
问题 I have an Xamarin.Forms project in which I want to use ZXing library for barcode scanning. However I am unable to install package ZXing.Net.Mobile and ZXing.Net.Mobile.Forms into my portable project. The exception I keep getting is as follows: Could not install package 'ZXing.Net.Mobile 2.0.4.46'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are

Is there any supported way to call asmx web services from cross-platform Xamarin code?

帅比萌擦擦* 提交于 2019-12-12 01:47:22
问题 We are having trouble figuring out how to call asmx web services from cross-platform Xamarin code. There seem to be four options. The first two seem flawed, and information is scarce on the other two. Can anyone offer some advice? Surely there must be at least one supported way to call web services from cross platform Xamarin apps. Here are the options we're aware of so far: We tried using WCF to make the calls, from a Portable Class Library (PCL). We got some incorrect behaviour, which we

HttpClient inside PCL throws NotImplementedException when called from a Silverlight app

拜拜、爱过 提交于 2019-12-11 18:15:57
问题 I have a portable class library (profile 147 supporting .NET4.03, Silverlight 5, WinPhone 8 and WinStore) that uses HttpClient to make HTTP calls. The library works fine in all platforms except for Silverlight 5. When the library is used from an SL5 application, an attempt to call SendAsync method with GET verb results in NotImplementedException: {System.NotImplementedException: The method or operation is not implemented. at System.Net.Browser.ClientHttpWebRequest.set_AllowAutoRedirect

Async call with HttpClient in PCL

…衆ロ難τιáo~ 提交于 2019-12-11 13:33:40
问题 I have a PCl in which I want to make a async call usingg HttpClient. I coded like this public static async Task<string> GetRequest(string url) { var httpClient = new HttpClient() { MaxResponseContentBufferSize = int.MaxValue }; HttpResponseMessage response = await httpClient.GetAsync(url); return response.Content.ReadAsStringAsync().Result; } But await is showing error "cannot await System.net.http.httpresponsemessage" like message. If I use code like this than everything goes well but not in

typeof( ICollection<> ).GetTypeInfo().IsAssignableFrom( typeof(IList<>) )

末鹿安然 提交于 2019-12-11 07:49:18
问题 I am trying to check the following typeof( ICollection<> ).GetTypeInfo().IsAssignableFrom( targetProperty.PropertyType.GetTypeInfo() ) where the argument passed into IsAssignableFrom is an IList<Something> . But it is returning false. The following also returns false. typeof( ICollection<> ).GetTypeInfo().IsAssignableFrom( targetProperty.PropertyType.GetTypeInfo().GetGenericTypeDefinition() ) Even the following is returning false. typeof( ICollection<> ).GetTypeInfo().IsAssignableFrom( typeof

Install WindowsAzure.Storage to PCL targeting Xamarin platforms

可紊 提交于 2019-12-11 07:37:33
问题 I need Azure Storage support in my app. I tried to add the nuget package, but I get the error that the dependency Microsoft.WindowsAzure.ConfigurationManager doesn't supports my current project. I targeted WP8 and Xamarin.Android. How can I get it into my PCL? 回答1: The WindowsAzure.Storage package doesn't support PCLs. It looks like there is a preview version that may support Windows Store apps and Windows Phone 8. You can request that the team add PCL support, or adapt the source code

HtmlAgilityPack-PCL + LINQ

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 07:13:35
问题 Well, basically I have a Windows Phone 8.1 app that's supposed to download the html file and parse it using HtmlAgilityPack-PCL and LINQ. var nodes = from tr in doc.DocumentNode.Descendants("body") from td in tr.Descendants("div").Where(x => x.Attributes["id"].Value == "screen")select tr; Then I'm trying to get the node from nodes : HtmlNode node = nodes.FirstOrDefault(); And this is the point where i have an exeption "Object reference not set to an instance of an object." The html file