xamarin.forms

Can´t load plist file, Error Failed to parse Plist data type:key

假如想象 提交于 2020-06-17 06:04:36
问题 I get the error from the title in my xamarin forms app. It doesn't have that error before I update VS2017. I did this because I need some libraries for unity (and load all the others related to games). Now I can't even load the iOS part in Xamarin Forms, it says is not available. This is my Info.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>UIDeviceFamily<

Turn on Airplane mode using AccessibilityService Class in Xamarin

大城市里の小女人 提交于 2020-06-17 05:52:28
问题 I want to turn on or off airplane mode using AccessibilityService . Any idea how we can do it? 回答1: Kamal you’re not going to be able to do it. It doesn’t seem like you’re doing iOS, but iOS has a lot of limitations due to privacy and security purposes that won’t allow you to do this. You can see more details here stackoverflow.com/q/20469425/11104068 Also android blocked being able to do this from Android 4.2 onwards. Only system apps can make changes to Airplane mode, as you can see here

How to upload files using NET CORE and Refit

旧巷老猫 提交于 2020-06-16 16:54:46
问题 When I use a POSTMAN to do make a request, my API receives a IList<IFormFile> . How can I do the same request using Xamarin.Forms with REFIT? 回答1: You can use IEnumerable<StreamPart> to upload a list of files: public interface IApi { [Multipart] [Post("/api/story/{id}/upload-images")] Task UploadImages(int id, [AliasAs("files")] IEnumerable<StreamPart> streams); } Then you can call it: var api = RestService.For<ISomeApi>("http://localhost:61468"); var files = new List<StreamPart>() { new

How to upload files using NET CORE and Refit

主宰稳场 提交于 2020-06-16 16:53:40
问题 When I use a POSTMAN to do make a request, my API receives a IList<IFormFile> . How can I do the same request using Xamarin.Forms with REFIT? 回答1: You can use IEnumerable<StreamPart> to upload a list of files: public interface IApi { [Multipart] [Post("/api/story/{id}/upload-images")] Task UploadImages(int id, [AliasAs("files")] IEnumerable<StreamPart> streams); } Then you can call it: var api = RestService.For<ISomeApi>("http://localhost:61468"); var files = new List<StreamPart>() { new

HttpClient.GetStreamAsync() with custom request?

旧巷老猫 提交于 2020-06-16 07:25:23
问题 My goal is to use the HttpClient class to make a web-request so that I can write the response to a file (after parsing). Therefore I need the result as a Stream . HttpClient.GetStreamAsync() only takes the string requestUri as parameter. So there is no possibility to create a request with custom HttpRequestHeader , custom HttpMethod , custom ContentType , custom content and so on? I saw that HttpWebRequest is sometimes used instead, but in my PCL (Profile111) there is no Add method for the

Android.OS.Environment… which namespace?

寵の児 提交于 2020-06-16 03:35:12
问题 I want to save some data to the storage (internal/external) of an Anroid device. I found this post where they got the external storage path with the following line: var sdCardPath = Android.OS.Environment.ExternalStorageDirectory.Path; Seems fair. But my Visual Studio says the following: The name 'Android' does not exist in the current context So I've been wondering in which namespace does this Android reside? I tried quite a lot (e.g. AutoImport, but that seems to give me the wrong parent;

Xamarin permissions plugin RequestPermissionsAsync not returning

ⅰ亾dé卋堺 提交于 2020-06-15 01:15:17
问题 I've tried opening tickets for this in the creators github account but he just kept closing it without confirmation that the issue was resolved. I'm trying to implement this plugin for xamarin forms permissions and everything works well except for one thing, when I try to request for permission using a real device, the task never returns whether or not the user allowed or denied the request. When I restart the project I can see that the user's last action regarding the permission took effect,

Xamarin permissions plugin RequestPermissionsAsync not returning

蹲街弑〆低调 提交于 2020-06-15 01:15:12
问题 I've tried opening tickets for this in the creators github account but he just kept closing it without confirmation that the issue was resolved. I'm trying to implement this plugin for xamarin forms permissions and everything works well except for one thing, when I try to request for permission using a real device, the task never returns whether or not the user allowed or denied the request. When I restart the project I can see that the user's last action regarding the permission took effect,

Is there a way to disable Auto Capitalisation on Xamarin Forms 'Entry' XAML

本秂侑毒 提交于 2020-06-13 19:30:10
问题 I have just started working in Xamarin and am writing an App targeting iOS and Android. I'm trying to keep pretty much all of my UI design in the common library between them and am starting to find the lines a bit blurred. My current requirement is to disable the auto-capitalisation on the 'Entry' tag object in XAML. Is this something that can be done by markup? I cannot find any property that would support this behaviour. If not, what should I do instead? 回答1: If you plan to use this

Is there a way to disable Auto Capitalisation on Xamarin Forms 'Entry' XAML

為{幸葍}努か 提交于 2020-06-13 19:30:04
问题 I have just started working in Xamarin and am writing an App targeting iOS and Android. I'm trying to keep pretty much all of my UI design in the common library between them and am starting to find the lines a bit blurred. My current requirement is to disable the auto-capitalisation on the 'Entry' tag object in XAML. Is this something that can be done by markup? I cannot find any property that would support this behaviour. If not, what should I do instead? 回答1: If you plan to use this