Questions tagged [xamarin]

15642 questions
1

votes
0

answer
4

Views

AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token

xamarin forms with office 365 authentification the authentification works fine but lately i receive this error message : AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token. with some research i find that i need to refres...
Soufiane BENHADDOU
0

votes
0

answer
3

Views

Unable to build Xamarin.iOS in release Mode (debug is working)

I am getting an build-Error 'XamlCTask task failed unexpectedly' Build-Error when building the xamarin.ios project in release mode (with VS). Building the Xamarin.ios project in debug-mode is working and also the xamarin.android project can be build (in release and debug mode) without getting any bu...
Isabelle
0

votes
0

answer
5

Views

Xamarin.Android Record Video with Google Vision Face Detection Support

I have developed a Xamarin.Android application for face detection using the following reference Face detection code reference. I need to record video in it. I don't need the face detection animation and all. Just I need the video. But while recording the video, the camera screen should show the fac...
Dhevendhiran M
0

votes
0

answer
7

Views

xamarin form: iOS webview not showing website run using react or ant design pro

I have problem showing the website which build using React and Ant Design Pro ON iOS webview. On android webview i can enable all the setting e.g. webView.Settings.EnableJavascript and other setttings to show the React/Ant Design Pro demo pages. Otherwise the webview is blank. On iOS, how do I sho...
LittleFunny
0

votes
1

answer
12

Views

What is the differnce between “using” and an “assembly”?

when I was using Xamarin.Essentials, I needed to add an assembly reference. What is the difference between them? I though both were references. Thanks!
meltemxxx
0

votes
1

answer
23

Views

Xamarin.Forms Android app hangs when opened by tapping push message

I have an Android app that is developed in Xamarin Android. Works fine, but I have an annoying bug: when launching app by tapping push message (via Firebase messaging) from Android top-bar, the app launches, but hangs in a black screen state. I have the following exception info: 03-20 10:24:02.907 W...
Tom
1

votes
3

answer
7.6k

Views

How to take a picture with iOS camera and save the image to camera roll using Xamarin

Hello Guys i'm working on a app that when you click a button it opens the stock iOS camera and lets you take a picture I know how to do this in objc but the apps written in C# using Xamarin i've looked on the Xamarin forms and google for help but everything is post iOS 8 witch this app needs to run...
Phoneswapshop
1

votes
2

answer
36

Views

generic object creation with type as function parameter in c#

I'm trying to create a generic function to parse my json result with Newtonsoft: private T ParseResult(string queryResult) { Result res = JsonConvert.DeserializeObject(queryResult); if (res.Success == 1) { try { return JsonConvert.DeserializeObject(JsonConvert.SerializeObject(res.data)); } catch (Ex...
fsulser
0

votes
0

answer
4

Views

Issue in Authorisation with Custom Domain in Azure Mobile App using Xamarin Forms

I have an application that is using an Azure Mobile Service configured with a custom authorization. We are using Barer Token to secure all the table controller. Everything working fine with Microsoft provided URL https://xxxxxxxx.azurewebsites.net. Suppose If we change the domain and I use somethin...
StezPet
0

votes
0

answer
4

Views

Is there a way to workaround the Xamarin.Forms Tizen ListView rowheight property limitation for TV?

I'm trying to find an alternative to set the row height of a listview in Tizen platform for TV. As we know there's a limitation related to the RowHeight property in Xamarim ListView for Tizen (https://developer.tizen.org/ko/development/api-reference/.net-application/current-xamarin.forms-limitations...
Tássio Souza
1

votes
1

answer
501

Views

Xamarin - Constantly getting NSInvalidArgumentException on Button click

I'm currently doing some cross-platform mobile development through Visual Studio using Xamarin (so in C#) and am about to start the iOS portion. I've never done iOS development before and thought I could get myself acquainted with their 'Hello, iOS' Tutorials. Unfortunately, things have not been goi...
kcborys
0

votes
0

answer
3

Views

Setting Constraint Relative to Cell caused NullException

I have a custom cell derived from UITableViewCell. The cell contains two controls which I would like to separate by space in the middle of the cell. Although the debugger shows references to all these control anchors, the call fails on the ContentView anchors. Why? public override void UpdateCons...
bc888
0

votes
1

answer
44

Views

System.DivideByZeroException: Attempted to to divide by zero

I can't figure out why I am getting this divide by zero exception. I'm new to programming in general and can't figure out what I'm doing wrong. private void BreakEvenCalculation() { var purchaseprice = Decimal.Parse(PurchasePriceEntry.Text); var purchaseweight = Decimal.Parse(PurchaseWeightEntry.Tex...
StevenB
8

votes
1

answer
115

Views

Xamarin forms play sound with CrossSimpleAudioPlayer

I wanna to play a sound that I've made download using CrossSimpleAudioPlayer plugin. I instantiate and initialise the plugin and everything works fine on the IOS, but on android it gives me this error when I load the file 'Java.IO.FileNotFoundException' but the file exists and has permission to read...
micael cunha
1

votes
1

answer
99

Views

Prism DI container from Android background service

My app has a background service that may be run independently of the main app (HostApduService). How can I access/use Prism's IContainer from this background service? I am aware that IContainer is available from Xamarin.Forms.Application.Current, see: https://tutel.me/c/programming/questions/4509...
FrozenKiwi
1

votes
2

answer
46

Views

How to pop then immediately push xamarin pages

my current navigation stack has two pages. First is page A, second is Page B. When I click my button, It'll add a new page to the navigation stack, Page C. May I ask how do I display Page C and remove Page B, or remove page B and display page C. I've tried the following await Navigation.PopAsync() a...
Phoenix
1

votes
2

answer
39

Views

Xamarin Forms: System.ObjectDisposedException when setting Focus to an Entry control

I have the following Xamarin Forms page that throws an exception on this line... The first time this page is loaded, the OnAppearing works fine, sets the focus properly, and doesn't throw an exception. When I navigate back to this page (ie, logout), OnAppearing is throwing the following... System.Ob...
John Livermore
1

votes
1

answer
57

Views

How do I chain SourceList observation using ReactiveUI and DynamicData?

Apologies if the terminology is off; I'm an iOS developer having to use Xamarin.iOS to develop an app. I'm using ReactiveUI with DynamicData and an MVVM architecture. I'm fairly happy with RxSwift, and FRP concepts in general. I have a Model that publishes a SourceList, according to the docs, lik...
Robin Macharg
0

votes
0

answer
2

Views

How to instantiate a viewcontroller from a storyboard with MVVMCross through an ios class library

Ok so I'm doing some prototypign and trying the following: Core project iOS Main Host Project iOS Class Library Project In iOS Class Library Project, I have a Storyboard called TestView.storyboard. Inside the storyboard I have one ViewController, the StoryboardId is set to TestView and Use Storyboar...
wpa
0

votes
0

answer
4

Views

Editable Grouped ListView in Xamarin Forms

I Would like to display something like nested listview in Xamarin forms. I mean i would like to have list of Person with theirs orders (the list of order could be empty). The List would allow to add order to specific person, remove person (and all of his orders), and remove specific order. I Conside...
Bartek Chyży
0

votes
0

answer
4

Views

Is it posible to turn android status bar fully transparent with Xamarin Forms?

I'm looking for a way to turn Android StatusBar completely transparent with Xamarin Forms. I can easily make it semitransparent by setting android:windowTranslucentStatus to true . It will be black with an opacity of about 50% but anyway its background will be visible, which is not what I want. I fo...
Konstantin
2

votes
0

answer
11

Views

Editor and keyboard overlapping (iOS) Xamarin forms 3.6 not working properly (Visual=Material)

I a seeing a strange behavior or may be totally wrong they way I do it. Got a page with an Editor at the bottom with a button and a listview with some messages at the top. I am using the keyboardRenderer in this link https://xamgirl.com/adjusting-elements-when-keyboard-shows-in-xamarin-forms/ Proble...
developer9969
1

votes
1

answer
26

Views

Xamarin Google Map

I am doing a looping in Xamarin, which add pin into the google map. Was wondering why it does not render to the Map immediately? I want to show the pin to be added into the Map one at a time, so I added Sleep for 1 second to delay the plotting. I think the reason is because its running on code behi...
Arthur Liew
0

votes
0

answer
4

Views

Is it possible to run two detectors from one CameraSource with Google Play Vision

I have an app, on Android only and using Xamarin that I want to do text recognition (OCR) and barcode scanning at approximately the same time. I am using Google Play Services Vision for this. I have created the TextRecognizer instance like this: var textRecognizer = new TextRecognizer.Builder(Appl...
Michael Bedford
1

votes
2

answer
85

Views

App.Current.MainPage NullReferenceException in Constructor of MainPageModel

On the loading of MainPage, I am pushing another page from Constructor of MainPageModel. It throws NullReferenceException in MainPageModel. This is my code MainPage constructor public MainPage() { InitializeComponent(); Title = 'MainPage'; BindingContext = new MainPageViewModel(); } MainPageModel...
CGPA6.4
4

votes
2

answer
132

Views

How to call a XAML code in NavigationPage.SetTitleView in Xamarin.Forms?

I have a Xamarin.Forms app that uses a custom navigation title view only for Android. For now my title view is defined in my template constructor like below: [ContentProperty(nameof(InnerContent))] public partial class ContentCustomTitleView : ContentPage { public static readonly BindableProperty In...
iamsophia
1

votes
1

answer
619

Views

How to unbind or clear MvvmCross fluent bindings

I am using MVVMCross fluent bindings in a Xamarin iOS project I am using a MvxFluentDescriptionSet to set up my bindings. Is there anyway to unbind for clear these bindings? The API only allows me to Apply the bindings. Am I missing something or is it impossible. The reason I want to do this is tha...
rideintothesun
0

votes
0

answer
15

Views

My button onClick process doesn't work xamarin android

My other buttons are working while this button just doesn't work. need help asap Here is a snippet of my codes: public class RegisterActivity : Activity { EditText txtfullname; EditText txtaddress; EditText txtusername; EditText txtpassword; EditText txtconfirmpass; Button btncreate; protected overr...
Jimbo Delfin
1

votes
2

answer
442

Views

Countdown MVVMCross with Xamarin Android

I want to create a countdown timer for my textview in my droid project in MVVMCross. This is my solution : I have a little problem with this solution because i can't use System.Threading.Timer, so i need to create my own class. But i don't know how, because, my own class must be in the Business Proj...
1

votes
2

answer
397

Views

How to draw a ellipse for imageButton xamarin.android? [duplicate]

This question already has an answer here: Rounded corners android image buttons 5 answers The default style of a ImageButton is square.
J. Joe
0

votes
0

answer
5

Views

AbsoluteLayout with proportional height and with minimum and maximum heights

We need a banner, called bannerView in the code bellow, to shrink or expand according to the device height. However this banner height: cannot be smaller than 60 pixels cannot be bigger than 146 pixels code: Note: We need the outer AbsoluteLayout to add a gradient effect on the screen
1

votes
3

answer
6.6k

Views

How to create multiple columns ListView in Xamarin.Forms ?

I have listview of one column, but i wanted to divide into two like a repeater. Is it possible in xamarin.forms ?
Santosh Thapa
1

votes
1

answer
998

Views

I need to load HTML and CSS (different from ANDROID and IOS) from a file and display in a WebView?

Please see my comments below before marking this as an exact duplicate of another question that is not looking for the same things. So far I have already tried loading locally like this: public HelpCards() { InitializeComponent(); var htmlSource = new HtmlWebViewSource(); htmlSource.Html = @' ABC DE...
Alan2
1

votes
2

answer
1.4k

Views

Read the SMS activation code automatically in Xamarin Forms instead of manually typing it by user

I wrote a project with Xamarin Forms. When every user has signed up, I send him/her an activation Code to confirm it and the user has to insert it to enter the app. But I am looking for a plugin or a way that the user does not need to insert the activation Code. I want the activation Code to be read...
Narges MirZamani
1

votes
2

answer
867

Views

Disable selecting Items in ListView

For a Social Networking app I am working on I am trying to display comments with a ListView but I do not want it to be highlighted when clicked. I tried using `((ListView)sender).SelectedItem = null;` in a selected event but that still shows it being selected for a second. I need it to never show....
Dan
1

votes
2

answer
22

Views

How to read image source or image name in xamarin.forms?

I am working on Xamarin forms, where I have used TapGestureRecognizer inside image now on tap of that image I need to get the source of the image in c#. How do I get that?. Why I am doing this is, radio buttons are not available in Xamarin forms, On tap of the image I will check the source of the im...
Sagar Patil
0

votes
3

answer
125

Views

Xamarin/WinForms clients unable to connect to a socket when sending/receiving in a two threaded architecture

Goal Send and receive message from TCP socket on two different threads in a UI program. Problem I can't connect to a socket and send/receive data ONLY when I'm in Xamarin.Forms and WinForms. So this is some kind of a threading issue. When I try connecting it just times out here so there is no error...
Sturla
1

votes
1

answer
170

Views

Xamarin.InAppBilling - “Error available inventory: System.NullReferenceException”

Note: I'm primarily posting this question here so that it's google indexed and spares some fellow poor soul the trouble of digging deep into this mess only to find it's not their own fault. An acceptable answer to this question would be a workaround I can use or someone at Xamarin/SimpleJson ack'ing...
Johannes Rudolph
1

votes
1

answer
2.6k

Views

How can i change background of programmatically added button in C# Xamarin?

I tried to make this, that way: btn.Background(Android.Graphics.Color holo_blue_dark); but it doesn't work, here is my code of adding this button (it's working fine except this background). Can you tell how to set other properties like height, margin etc.? Button btn = new Button(this); i++; title =...
KubenQPL
1

votes
1

answer
112

Views

Load data asynchronously after notification on apple watch

I'm receiving a notification that has, among other things, an ID in its payload. This ID is simply there so I can fetch the actual object on the server. Right now, I only communicate using the AppDelegate HandleWatchKitExtensionRequest, and the .OpenParentApplication from the Watchkit. Using that, i...
Gil Sand

View additional questions