Xamarin

Printing to POS Printers in Xamarin Forms Android

蓝咒 提交于 2021-02-11 15:31:19
问题 I have an app that is built with XF and I want it to be able to discover POS Printers through LAN, USB and maybe WIFI too, and print receipts with a very simple template. Does anyone have any leads ? there is this ePOS Android SDK : https://download.epson-biz.com/modules/pos/index.php?page=prod&pcat=3&pid=36 But it's with JAVA. And I also found this nugget ESC-POS : https://github.com/lukevp/ESC-POS-.NET If there is anyone who have any idea on how I should proceed or already done it before I

Xamarin Media Plugin Auto start or Timer

此生再无相见时 提交于 2021-02-11 15:30:03
问题 In my iOS Xamarin forms project I'm using Xam.Plugin.Media from https://github.com/jamesmontemagno/MediaPlugin as follows async void Handle_Clicked(object sender, System.EventArgs e) { await CrossMedia.Current.Initialize(); var file = await CrossMedia.Current.TakeVideoAsync(new Plugin.Media.Abstractions.StoreVideoOptions { DefaultCamera = CameraDevice.Front, SaveToAlbum = true, }); } Is it possible to automatically start video recording or set a timer for the recording to start? Ultimately, I

Not showing image in Xamarin.CarouselView

拥有回忆 提交于 2021-02-11 15:23:27
问题 I'm using xamarin build an app which get image from webservice and bind to carousel view. But I can't see the image showing. This is my xaml. <StackLayout HeightRequest="250"> <cv:CarouselView x:Name="carouselViewImage"> <cv:CarouselView.ItemTemplate> <DataTemplate> <Image Source="{Binding base}" VerticalOptions="Center" HeightRequest="180" WidthRequest="100"/> </DataTemplate> </cv:CarouselView.ItemTemplate> </cv:CarouselView> </StackLayout> This is my code ImageSources = await Task.Run(() =>

Returning to previous activity in Xamarin Android

本秂侑毒 提交于 2021-02-11 15:02:59
问题 I have two activities: MainActivity and Activity2 : public class MainActivity : AppCompatActivity { DateTime time = DateTime.Now; protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); SetContentView(Resource.Layout.activity_main); var button = FindViewById<Button>(Resource.Id.button); button.Text = "Button created at " + time.ToString(); button.Click += (s, e) => { Intent intent = new Intent

Save image from an image box to gallery in Xamarin Forms

…衆ロ難τιáo~ 提交于 2021-02-11 14:57:40
问题 Is there a way to save the picture in an image control to the Android gallery in Xamarin Forms? All help is appreciated. var image = new Image(); image.Source = "test.png"; Screenshot 回答1: You could use Dependency Service to get the stream from Resource/drawable image. Create the IDependency interface. public interface IDependency { MemoryStream DrawableByNameToByteArray(string fileName); } Android implementation public class DependencyImplementation : IDependency { public MemoryStream

how to fix firebase error UISearchdisplayController is no longer supported. Migrate to UISearchController.?

大城市里の小女人 提交于 2021-02-11 14:54:37
问题 Xcode 11.3 version Xamarin.iOS version: 13.10.0.17 (Visual Studio Community) Xamarin.Firebase.iOS.Auth version: 5.0.4.1 Xamarin.Firebase.iOS.CloudFirestore version: 0.13.3 Xamarin.Firebase.iOS.Core version: 5.1.8 I have noticed this crash recently, only with app store distributed version [Test flight build] The two crazy things are for me : I’m not using “UISearchDisplayController” but the required new “UISearchController”. Why is not crashing in local, but only on the AppStore version ? Same

How to use vertical Scroll view to show binding data

ⅰ亾dé卋堺 提交于 2021-02-11 14:45:16
问题 I want a structure like this : Click this to see the desired output But with my code i'm getting this : Click this to see the output Here is my xaml code : <ScrollView Orientation="Horizontal"> <StackLayout Orientation="Horizontal" VerticalOptions="Start"> <Grid x:Name="ImagesListViews" > <Grid.RowDefinitions> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> </Grid> <local:BindableStackLayout x:Name=

Xamarin Forms - center title in a stacklayout

*爱你&永不变心* 提交于 2021-02-11 14:41:14
问题 The screenshot below shows a header that includes a hamburger menu and a title. Notice how the title is centered on it's bounding area (the red box). How can I get the title to center on the width of the phone, but leave the hamburger menu where it is? Here is the code that creates the header area... <?xml version="1.0" encoding="UTF-8"?> <ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="WP.MobileMidstream.Device.Pages

Xamarin Forms - center title in a stacklayout

大憨熊 提交于 2021-02-11 14:36:26
问题 The screenshot below shows a header that includes a hamburger menu and a title. Notice how the title is centered on it's bounding area (the red box). How can I get the title to center on the width of the phone, but leave the hamburger menu where it is? Here is the code that creates the header area... <?xml version="1.0" encoding="UTF-8"?> <ContentView xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="WP.MobileMidstream.Device.Pages

Cannot register device in Azure NotificationHub on iOS, no callbacks

浪尽此生 提交于 2021-02-11 14:21:52
问题 I'm trying to set up push notifications via Azure NotificationHub (using these guides). Android went fine, but iOS... No matter what I do, I do not receive any callbacks from RegisterNative / RegisterTemplate methods of SBNotificationHub , and no registrations appear in the hub. My code (pretty straightforward): public static void SubscribeToAzure(NSData deviceToken, string[] subscriptionTags = null, bool bUnsubscribe = false) { try { var Hub = new SBNotificationHub(AppConstants