xamarin.android

justify text without custom render

。_饼干妹妹 提交于 2021-01-07 02:41:17
问题 I wanted to know if there is no way other than custom rendering to arrange the ends of the texts in xamarinforms? Because the modification does not support Android 7 and below. Thanks to those who respond! This code is related to my CustomRendering , which in Android 7, my app crashes: [assembly: ExportRenderer(typeof(CustomLabel), typeof(CustomLabelRender))] namespace Liko.Droid { public class CustomLabelRender : LabelRenderer { public CustomLabelRender(Context context) : base(context) { }

justify text without custom render

廉价感情. 提交于 2021-01-07 02:37:16
问题 I wanted to know if there is no way other than custom rendering to arrange the ends of the texts in xamarinforms? Because the modification does not support Android 7 and below. Thanks to those who respond! This code is related to my CustomRendering , which in Android 7, my app crashes: [assembly: ExportRenderer(typeof(CustomLabel), typeof(CustomLabelRender))] namespace Liko.Droid { public class CustomLabelRender : LabelRenderer { public CustomLabelRender(Context context) : base(context) { }

Append data to text file in android 10 (API 29)

我们两清 提交于 2021-01-07 01:39:35
问题 I am working on an application where app writes a log file with the currentdate as filename Ex: 20200710.txt The earlier was working fine before android 10 but from android 10 the code is no longer writing the file in the external storage. So I have modified the code a bit for android 10 especially string logDir = "Documents/MyApp_Data/logs/"; Context context = MyApplication.Context; ContentValues values = new ContentValues(); values.Put(MediaStore.MediaColumns.DisplayName, filename); values

Append data to text file in android 10 (API 29)

末鹿安然 提交于 2021-01-07 01:37:10
问题 I am working on an application where app writes a log file with the currentdate as filename Ex: 20200710.txt The earlier was working fine before android 10 but from android 10 the code is no longer writing the file in the external storage. So I have modified the code a bit for android 10 especially string logDir = "Documents/MyApp_Data/logs/"; Context context = MyApplication.Context; ContentValues values = new ContentValues(); values.Put(MediaStore.MediaColumns.DisplayName, filename); values

Unable to save push notification in SQLite when Xamarin Android App is Swiped or closed

天涯浪子 提交于 2021-01-07 01:32:17
问题 I am having issues saving and displaying push notification in my apps UI when the app is swiped from memory or closed. I still receive the notifications in this state, but upon opening the app or tapping the notification to open the app, the message does not display. Everything works fine when the app is running or in the background. I've followed the documentation here https://docs.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/azure-services/azure-notification-hub with a few

Fail to connect to camera service in Xamarin

拈花ヽ惹草 提交于 2021-01-05 07:29:48
问题 In my Xamarin app, there is a Custom Camera Renderer. It had issue, which @Jai had resolved. It solved all the problems, but I wasn't able to use the Front Camera, could only use Rear Camera. He suggested to use Control.Preview = Camera.Open((int)e.NewElement.Camera); instead of Control.Preview = Camera.Open(); As there are multiple pages, the first two pages has Rear Camera enable, and on the last, Front Camera . When I choose to Redo (take all the 3 Pictures, and then start again from first

Fail to connect to camera service in Xamarin

狂风中的少年 提交于 2021-01-05 07:29:46
问题 In my Xamarin app, there is a Custom Camera Renderer. It had issue, which @Jai had resolved. It solved all the problems, but I wasn't able to use the Front Camera, could only use Rear Camera. He suggested to use Control.Preview = Camera.Open((int)e.NewElement.Camera); instead of Control.Preview = Camera.Open(); As there are multiple pages, the first two pages has Rear Camera enable, and on the last, Front Camera . When I choose to Redo (take all the 3 Pictures, and then start again from first

Fail to connect to camera service in Xamarin

强颜欢笑 提交于 2021-01-05 07:29:22
问题 In my Xamarin app, there is a Custom Camera Renderer. It had issue, which @Jai had resolved. It solved all the problems, but I wasn't able to use the Front Camera, could only use Rear Camera. He suggested to use Control.Preview = Camera.Open((int)e.NewElement.Camera); instead of Control.Preview = Camera.Open(); As there are multiple pages, the first two pages has Rear Camera enable, and on the last, Front Camera . When I choose to Redo (take all the 3 Pictures, and then start again from first

How to get MediaFile object from a Audio File path?

情到浓时终转凉″ 提交于 2021-01-05 07:07:36
问题 I have used Xamarin.Android Recorder to record a audio and i am getting recorded audio file path. Now i need to upload that audio file to Server using this. Please help me to create MediaFile object for a recorded audio file in Xamarin.Forms. Xamarin.Android solution will also work as i will create Dependency service to use it. 来源: https://stackoverflow.com/questions/65306057/how-to-get-mediafile-object-from-a-audio-file-path

Accept self-signed certificates in Xamarin Android

耗尽温柔 提交于 2021-01-02 17:12:20
问题 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