xamarin.android

Accept self-signed certificates in Xamarin Android

梦想的初衷 提交于 2021-01-02 17:09:33
问题 I got a Xamarin Forms project and inside the MainPage.xaml.cs file i want to perform a request to my server. The server is written in ASP.NET Core 2 and is running with a self-signed certificate. To buy a certificate isn't a solution for my problem, because customers don't want it and application only running in LAN. In my MainPage.xaml.cs file the Http-request looks like this: HttpClient m_Client = new HttpClient(); var uri = new Uri(myURL); var response = await m_Client.GetAsync(uri); if

Accept self-signed certificates in Xamarin Android

两盒软妹~` 提交于 2021-01-02 17:08:38
问题 I got a Xamarin Forms project and inside the MainPage.xaml.cs file i want to perform a request to my server. The server is written in ASP.NET Core 2 and is running with a self-signed certificate. To buy a certificate isn't a solution for my problem, because customers don't want it and application only running in LAN. In my MainPage.xaml.cs file the Http-request looks like this: HttpClient m_Client = new HttpClient(); var uri = new Uri(myURL); var response = await m_Client.GetAsync(uri); if

Accept self-signed certificates in Xamarin Android

岁酱吖の 提交于 2021-01-02 17:07:59
问题 I got a Xamarin Forms project and inside the MainPage.xaml.cs file i want to perform a request to my server. The server is written in ASP.NET Core 2 and is running with a self-signed certificate. To buy a certificate isn't a solution for my problem, because customers don't want it and application only running in LAN. In my MainPage.xaml.cs file the Http-request looks like this: HttpClient m_Client = new HttpClient(); var uri = new Uri(myURL); var response = await m_Client.GetAsync(uri); if

Xamarin Android - Change colors for TimePicker keyboard view

与世无争的帅哥 提交于 2021-01-01 06:10:21
问题 I was able to change the color setting for the clock view (That was helpful https://www.tutorialsbuzz.com/2019/09/android-timepicker-dialog-styling.html) But I wasn't so successful at the second view (press the keyboard icon at the bottom left of the first image). How to change the color of SubTitle, InputField and description (center of the image that looks pure black)? Has anyone an idea? Is there a documentation that I overlook? Would be great to have a list with all keys like "android

How to change the status bar color without a navigation page

拟墨画扇 提交于 2020-12-31 04:38:18
问题 I want to change the status bar color on some views. I found this solution https://github.com/yuv4ik/XFDynamicStatusBarAppearance but it's working only with NavigationPage. I don't need from my app Navigation Page ... public App() { InitializeComponent(); MainPage = new MainPage(); } Here is my try ... var statusBarStyleManager = DependencyService.Get<IStatusBarStyleManager>(); MainCarousel.PositionChanged += (sender, e) => { switch (e.CurrentPosition) { case 1: Device.BeginInvokeOnMainThread

How to change the status bar color without a navigation page

六月ゝ 毕业季﹏ 提交于 2020-12-31 04:37:25
问题 I want to change the status bar color on some views. I found this solution https://github.com/yuv4ik/XFDynamicStatusBarAppearance but it's working only with NavigationPage. I don't need from my app Navigation Page ... public App() { InitializeComponent(); MainPage = new MainPage(); } Here is my try ... var statusBarStyleManager = DependencyService.Get<IStatusBarStyleManager>(); MainCarousel.PositionChanged += (sender, e) => { switch (e.CurrentPosition) { case 1: Device.BeginInvokeOnMainThread

Visual Studio 2017 studio showing error 'This application is in break mode' and throws unhandled exception

血红的双手。 提交于 2020-12-30 07:58:21
问题 I am developing a Xamarin.Android app. Whenever i try to download a JSON feed I get the error "Your app has entered a break state, but there is no code to show because all threads were executing external code" . Here's the screenshot of error My json feed download code string url = "http://xamdev.epizy.com/getData1.php"; public async void downloadJsonFeedAsync(String url) { var httpClient = new HttpClient(); Task<string> contentsTask = httpClient.GetStringAsync(url); // await! control returns

Visual Studio 2017 studio showing error 'This application is in break mode' and throws unhandled exception

橙三吉。 提交于 2020-12-30 07:58:05
问题 I am developing a Xamarin.Android app. Whenever i try to download a JSON feed I get the error "Your app has entered a break state, but there is no code to show because all threads were executing external code" . Here's the screenshot of error My json feed download code string url = "http://xamdev.epizy.com/getData1.php"; public async void downloadJsonFeedAsync(String url) { var httpClient = new HttpClient(); Task<string> contentsTask = httpClient.GetStringAsync(url); // await! control returns

How can I do this floating action button where can run even in background mode in Xamarin forms

半腔热情 提交于 2020-12-30 04:48:22
问题 Here's my sample: I need this to be a connection in other apps... Thank you! 回答1: Floating Windows are implemented primarily through the WindowsManager class. Here is a simple sample you could refer to. Create a FloatingService : [Service] class FloatingService : Service,Android.Views.View.IOnTouchListener { WindowManagerLayoutParams layoutParams; IWindowManager windowManager; View floatView; public override void OnCreate() { base.OnCreate(); } [return: GeneratedEnum] public override

How can I do this floating action button where can run even in background mode in Xamarin forms

纵然是瞬间 提交于 2020-12-30 04:45:00
问题 Here's my sample: I need this to be a connection in other apps... Thank you! 回答1: Floating Windows are implemented primarily through the WindowsManager class. Here is a simple sample you could refer to. Create a FloatingService : [Service] class FloatingService : Service,Android.Views.View.IOnTouchListener { WindowManagerLayoutParams layoutParams; IWindowManager windowManager; View floatView; public override void OnCreate() { base.OnCreate(); } [return: GeneratedEnum] public override