Questions tagged [xamarin.essentials]

A cross-platform .net library that goes with Xamarin and Xamarin Forms to provide device specific API such as GPS, Media, etc

195 questions
2
votes
1 answer

How to deal with Xamarin.Essentials which Android 13 seems to have broken?

I want to send users who press a button in my Uno Platform (Xamarin) Android mobile app to a pre-populated email with the body and subject passed as a parameter, so as to automate the process of sending a report. The app uses the MVVM pattern, the…
jaakko
  • 21
  • 2
2
votes
1 answer

Send SMS to multiple recipients, without sharing numbers (BCC)

I would like to send the same message by SMS to multiple recipients. But don't want recipients to know each other (like BCC in emails). And I don't want to use an external SMS sender. I'm currently using Xamarin.Essentials.Sms to compose the message…
Alfa
  • 43
  • 1
  • 6
2
votes
0 answers

Vs2019+vs2022 avoid breaking on Xamarin.Essentials.FeatureNotSupportedException

When using sensors such as barometer,compas etc. in Xamarin.Forms you cannot check if the sensor is available but have to try starting it and then catch the exception, if it is not there, such as here. try { Barometer.Start(SensorSpeed.Game); } …
2
votes
0 answers

How to retrieve contact image Xamarin.Forms

I try to use the contacts list in my Xamarin.Form application. I use Task> contact = await Xamarin.Essentials.Contacts.GetAllAsync(token); but Contact doesn't contain a field with image. What can I use instead? Thank you in…
2
votes
4 answers

repeated use of Xamarin.Essentials.MediaPicker.CapturePhotoAsync restarts my app on Android 11

I need to take more photos, but the app restarts on Android 11 devices. Android 10 or lower is OK. It behaves enigmatic. Sometimes it happens after third capturing, sometimes maybe after seventh capturing. Simulation of the problem (restart after…
2
votes
1 answer

SecureStorage does not throw an exception when key does not exist

I have a curiously curious bug happening in my app. I have this very simple helper method I use to store some cool data on the user device: public static async Task TrySetAsync(string key, string value) { try { await…
2
votes
1 answer

Class Not Found Exception: xamarin android

I am trying to debug my android application but unfortunately it gives exception : Java.Lang.RuntimeException: 'Unable to get provider android.support.v4.content.fileprovider: java.lang.ClassNotFoundException: Didn't find class…
2
votes
1 answer

Using Xamarin Essentials File Picker in Fabulous (F#) UWP app

I am testing out making a UWP app using the Fabulous framework for writing functional cross-platform apps, and I want to use a FilePicker on a button press and use the selected file for some data processing. Executing let fileResult =…
MechMayhem
  • 75
  • 7
2
votes
1 answer

Xamarin Essentials Unable to exchange Okta authorization code for token

I was using OpenID and we have to switch to Xamarin.Essentials.WebAuthenticator. I can get an authorization code from Okta using WebAuthenticator.AuthenticateAsync(). But, everything I try to then translate that code into an access token returns 400…
jsureke
  • 79
  • 9
2
votes
1 answer

Xamarin.Forms - Xamarin.Essentials namespace missing MediaPicker or FilePicker classes

I have started a Xamarin.Forms cross-platform project in VS 2019, Android + iOS + UWP. I need to use Xamarin.Essentials.FilePicker and Xamarin.Essentials.MediaPicker classes. The problem is that FilePicker and MediaPicker classes are not available…
Bull
  • 748
  • 1
  • 11
  • 24
2
votes
1 answer

How to retrieve all contacts list in xamarin forms

I tried to use plugin Xamarin.Forms.Contacts and followed the github link, https://gist.github.com/enisn/25fd0a63a849854fb6103aa681be9963 But, when I compile and debug nothing is shown on screen. I added the plugin to Android and iOS also and setup…
Emad mohd
  • 33
  • 5
2
votes
3 answers

What is the difference between Xamarins.Essentials and Xamarin.Forms DependencyService

I'm a new developer on Xamarin and I was guessing what is the difference between Xamarins.Essentials and Xamarin.Forms DependencyService? I understood that Xamarins.Essentials is a framework providing cross-platform API in order to use geolocation,…
Clément
  • 25
  • 6
2
votes
3 answers

How to launch Android Settings app to your app's settings with Xamarin.Essentials Launcher?

I am working on an app for Android and iOS using Xamarin.Forms along with Xamarin.Essentials. I'd like to be able to provide a button in my app that would take the user to the device's 'Settings' app, then into the specific settings page for this…
jbachelor
  • 95
  • 2
  • 7
2
votes
1 answer

Adding a custom font in Xamarin

According to this post: https://devblogs.microsoft.com/xamarin/embedded-fonts-xamarin-forms/ The new way to add a custom font is to add the font as an embeddedResource and then add this line in App.xaml.ca: [assembly:…
Eric Ouellet
  • 10,996
  • 11
  • 84
  • 119
2
votes
1 answer

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

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…
Adam Mrozek
  • 1,410
  • 4
  • 26
  • 49
1
2
3
12 13