portable-class-library

Show contentpage that called local notification when notification is clicked

試著忘記壹切 提交于 2019-12-02 17:30:39
问题 I'm relatively new to Xamarin and have gotten to a point in my application where I want to have notifications, I'm using local notifications to show the user that they have received a message from someone in my application. While I can get the notification to show, when it clicks it either shows nothing or it "restarts" the application (takes the user back to the login page). How do I get the notification to show a set page, such as my contacts page when the notification is clicked on? 回答1:

how to use WCF Service in Xamarin.Forms Portable class library

北城以北 提交于 2019-12-02 16:43:28
问题 I am trying to call method created correctly using WCF, I start debugging the project for WCF and the result as the following: on my xamarin.forms code i used HttpClient Library as the following: private async Task DownloadInfo() { var Uri = "http://localhost:10300/RestServiceImpl.svc/json"; var httpClient = new HttpClient(); var json= await httpClient.GetStringAsync(Uri); } when I am trying to get json result from Xamarin.Forms I get the following: what I should do? 回答1: It seems like you

Show contentpage that called local notification when notification is clicked

被刻印的时光 ゝ 提交于 2019-12-02 11:42:32
I'm relatively new to Xamarin and have gotten to a point in my application where I want to have notifications, I'm using local notifications to show the user that they have received a message from someone in my application. While I can get the notification to show, when it clicks it either shows nothing or it "restarts" the application (takes the user back to the login page). How do I get the notification to show a set page, such as my contacts page when the notification is clicked on? How do I get the notification to show a set page, such as my contacts page when the notification is clicked

how to use WCF Service in Xamarin.Forms Portable class library

偶尔善良 提交于 2019-12-02 09:47:42
I am trying to call method created correctly using WCF, I start debugging the project for WCF and the result as the following: on my xamarin.forms code i used HttpClient Library as the following: private async Task DownloadInfo() { var Uri = "http://localhost:10300/RestServiceImpl.svc/json"; var httpClient = new HttpClient(); var json= await httpClient.GetStringAsync(Uri); } when I am trying to get json result from Xamarin.Forms I get the following: what I should do? It seems like you are inspecting the task there, this doesnt give that much information. You can try this little more structured

Sending Http requests from Xamarin Portable Class Library

二次信任 提交于 2019-12-02 05:18:53
问题 I have quite decent problems with this very simple task and asking for help. The question is: what is the best and the most reliable way to perform Http requests with timeout from Xamarin PCL? There are several options: Using old HttpWebRequest. This solution should definitely be working, but I have problems with BeginGetRequestStream method described in this question: HttpWebRequest BeginGetRequestStream callback never called Also it requres some extra ugly code to implement timeouts

Microsoft.Threading.Tasks.Extensions in Xamarin Mono projects

醉酒当歌 提交于 2019-12-02 02:50:45
I have built a NuGet package for my Simple.OData.Client with support for Xamarin Android and iOS. This library uses Microsoft.Bcl.Async. Tests using Android and iOS simulator went OK, but when I install this new NuGet package into another project, it fails to compile Droid/Touch projects with the following message: C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(720,2): error : Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken

How to use PCL in ASP.NET Core 1.0 RC2 project

情到浓时终转凉″ 提交于 2019-12-01 21:50:36
I want to use a simple (POCO only without other dependencies) PCL with targets Xamarin.Android Universal Windows 10 ASP.NET Core 1.0 in an ASP.NET Core 1.0 RC2 project (all in the same solution). I have added this import to my project.json: "frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "dnxcore50", "portable-net451+win8" ], "dependencies": { "PCL.Library": { "target": "project" } } } } I don’t get any errors (compilation or otherwise) and the PCL.Library project shows up in the references (without warning signs or anything). But I can’t use it in my ASP.NET Core 1.0 RC2 project

How should I create a library targetting .NET Framework 4.5.1 and .NET Standard 1.3 in VS 2017 RC?

橙三吉。 提交于 2019-12-01 21:31:59
This is my first time trying anything that targets more than just a .NET Framework. I can't seem to do it from the GUI. I've tried project type 'Class Library (Portable)' and project type 'Class Library (.NET Standard)'. I can change a 'Class Library (Portable)' to target .NET Standard but then I can't select anything else. I'm not sure if I should try to change the .csproj of 'Class Library (.NET Standard)' or the project.json of 'Class Library (Portable)', I just want whatever is most future-proof. As of a few days ago the .csproj has been simplified and ease of use has improved. With the

Creating a PCL that targets Monodroid

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 16:46:46
问题 I am looking at the shiny MVVMCross project, specifically the N+1 days of MVVMCross series, and I notice that @slodge creates a PCL that targets Mono for android and Monotouch (at 1:10). I have mono for Android installed, but my VS does not give me any PCL targets apart from the standard - am I doing anything wrong? 回答1: The situation for PCLs is changing - Xamarin are releasing official support for PCLs very soon. In the meantime, there are quite a few blog posts around on how to get PCLs

Is there a way to easily parse file paths in portable class libraries?

可紊 提交于 2019-12-01 16:03:18
I'm needing to parse a path into parts from within a portable class library and get things like the filename, extension, just directory name, etc. All of these methods are fairly easy to access from within System.IO.Path, however, this doesn't seem to exist within portable class libraries. Is there an open source replacement for this or some other API that would give me the same functionality? You may be able to use or adapt the code for System.IO.Path from Mono: https://github.com/mono/mono/blob/master/mcs/class/corlib/System.IO/Path.cs EDIT: Also, my PCL Storage library provides some file IO