xamarin.essentials

Xamarin Forms: How to highlight text and pause/play audio of text to speech?

≡放荡痞女 提交于 2021-01-29 09:00:25
问题 I am using the xamarin essentials package for text to speech feature. When speech the text I need to highlight the corresponding text. Also, I need an option to pause/play the speech. Please see this video. Screenshot: How can I achieve highlight text feature and pause/play audio as the video? 回答1: highlight text feature You could splite the Text of Label . And use Span to set the highlight . in xaml <StackLayout x:Name="firstPage" VerticalOptions="CenterAndExpand" HorizontalOptions=

Xamarin.Forms: How to download an Image, save it locally and display it on screen?

可紊 提交于 2020-04-14 08:06:53
问题 I have an issue with opening JPG file in native application on Android. I'm using newest release of Xamarin Essentials, there is some functionality called Launcher. Here is my code await Launcher.TryOpenAsync("file:///" + localPath); My local path is file stored in Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); . Whenever I try to open that file I am getting error: file:////data/user/0/mypackagename/files/.local/share/Screenshot.jpg exposed beyond app through

Xamarin Orientation Sensor Quaternion

大城市里の小女人 提交于 2019-12-11 18:06:39
问题 I'm trying to determine a 3d vector Vector3 representing my phones orientation without an angle. What I'm looking for is the vector that figuratively comes out of the back of the phone like a ray, basically a normal vector of the phone. I know the quaternion gives me a transformation, but to what? Furthermore, I found Quaternion.ToAxisAngle() , which transforms a quaternion to an axis and its respective roll angle. I thought, great, that's what I need, I can just ignore the angle. When the

Xamarin Orientation Sensor Vector Angle

怎甘沉沦 提交于 2019-12-11 09:08:59
问题 I'm using Xamarin.Essentials.OrientationSensor in my project and I'm having trouble interpreting the Quaternion the API gives me on new readings. Problem Description Here's a figure describing my problem: I need to determine an orientation vector v being normal/orthogonal to the phone's plane (i.e. a vector coming out of the back of the phone). I then need to transform this vector v into a 3D state space being (latitude, longitude, altitude) . This will enable me to compute the angle between