Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [xamarin]

Xamarin is a San Francisco based software company created by the engineers that created Mono, MonoTouch and Mono for Android which are cross-platform implementations of the Common Language Infrastructure (CLI) and Common Language Specifications (often called Microsoft .NET). With a C# shared codebase, developers can use Xamarin tools to write native iOS, Android, and Windows apps with native user interfaces and share code across multiple platforms.

2
votes
1answer
52 views

Deserializing response to correct type

I use this method to get either Customer or Account. The server will determine which type it is. The response will have a property "Type": "Customer" or ...
1
vote
1answer
70 views

Login flow in app

I made the login flow without any reference to a tutorial. So I want some feedback. Basically it sends username and password in a POST request to /token. The app stores the tokens on device, then ...
2
votes
0answers
38 views

TDD test class for ViewModel class

I am currently writing my first TDD application. The project is in Xamarin.Forms and tested in xUnit. I am wondering if maybe more experienced developers will have any comments or suggestions ...
-1
votes
1answer
61 views

C# Handling Task Cancellations/Timeouts and Exceptions [closed]

I am very new to Tasks and therefore new to handling task cancellations and task exceptions. I wrote this method that gets a List which is then used to populate an ObsservableCollection shown in a ...
0
votes
0answers
67 views

Make API request with Access Token and Refresh

I have a class that makes API requests for a mobile app. The code can be making multiple API requests at the same time. But, if the request is unauthorized, I want to refresh the access token. While ...
4
votes
2answers
70 views
1
vote
0answers
148 views

Xamarin Forms with Ninject navigation service

I am new to Xamarin Forms and I have been searching online finding ways to set up navigation in a MVVM fashion. In particular I am designing around a concept I found here. However, I am using Ninject ...
2
votes
1answer
159 views

Class to make Web Service calls

I've a web service class to handle all requests to the external service. All the methods are very similar, so I want to refactor this into DRY code. This is an app in Xamarin.Forms. I'm making the ...
3
votes
1answer
2k views

Giving error response in Web API

I'm creating a Web Api in .NET Framework that is connected to an ASMX service. No own logic, just pass through data. Everything works as expected. But not sure if it's good. Have to repeat the same ...
3
votes
1answer
151 views

Make requests to SOAP API

I would like feedback on this class library, mainly the architecture. It works very well. But maybe someone knows how to improve it. This is a class library for working towards an external system. I ...
3
votes
1answer
2k views

Login modal with MVVM pattern

I would like some feedback on whether this follows MVVM principles well. The MainPage has a Login button that opens the login modal page. Upon successful login, the LoginPageViewModel will raise an ...
-3
votes
1answer
76 views

Initializing commands C# [closed]

...
1
vote
1answer
4k views

Parsing SOAP messages from a web service

I'm consuming an ASMX service with SOAP messages. Since Xamarin doesn't support SOAP 1.2, I'm writing the Web requests manually. I'm sending a user/password to retrieve the user ID. A successful ...
3
votes
0answers
577 views

List nearby bluetooth devices as well as devices in the database

I made a list of all nearby printer devices (that match the same name in the database) as well as all printer devices from the database. They are separated in the list by "--". I am able to get the ...
1
vote
0answers
31 views

Save Position on the cloud or locally

I have a tracking software. At first I just send the position to the web Service ...
1
vote
0answers
25 views

Initalize first page in Xamarin

EventPage is the RootPage of the application, on appearing eventpage calls loginpage and with a button loginpage in turn calls other pages. My question is, is this a good way to do this? ...
2
votes
1answer
351 views

Reading file from flash with Xamarin.Forms on Android using ActionOpenDocument intent with StartActivityForResult

I have a Xamarin.Forms application which utilizes dependency services to access Android specific features, in this case file access on the storage. The file we are accessing is a serialized .xml file ...
1
vote
1answer
86 views

Xamarin Prism IOC

sorry for this type of question, I am wondering if are there any good code practice to use in order to isolate IOCs on my App.cs ...
1
vote
0answers
42 views

Change ObservableCollection's data

I'm having a ListView which contains some users. This ListView is used to select users which should be added to a new group chat....
5
votes
1answer
89 views

Painting a lot of diagrams for a board game

I'm creating a chess application and I would like to show plenty of big chess diagrams in scrollview. At the moment I just create ImageView for every diagram, create bitmap into it, paint the diagram ...
-3
votes
1answer
1k views

c# Linq vs foreach [closed]

which better in performance consider that case I have an array of objects (DocsOrder), I looped throw that array to match exists of passed data ...
1
vote
0answers
106 views

Xamarin.Forms Use Plugin or DependencyService

I am working on Xamarin forms project that targets three platforms (Android, iOS, UWP), and I was wondering which better to use Plugins or it's better to use DependencyService https://developer....
2
votes
1answer
2k views

MVVM pattern in Xamarin login form

Please let me know if the MVVM pattern I followed in this is correct or not. Here is the code for ViewModel ...
1
vote
0answers
62 views

Android Smartband2 Reader in Xamarin

This is the code I'm using. it was written a long time ago but has probably gotten a bit deprecated now and I wonder how it can be improved. It's for an xamarin cross-platform project for IOS and ...
2
votes
1answer
570 views

Submit form data to server side

I have this method here called SubmitProc which submits form data that the user filled out to the server side and does a check if the response to the server goes through. If it's fine, great. If not, ...
0
votes
1answer
207 views

AsyncTask for subscribing to current location

I made the below CurrentLocationTask as a way of reducing code duplication, as my application currently has 2 different Activity...
-1
votes
2answers
1k views

Design pattern to implement Database operations [closed]

I am trying to implement design pattern in my project and have been reading material over net. we have a sales application ( in C# ) where in we are storing entities like ...
1
vote
1answer
52 views

Navigating menus in automation tests

I am trying to write a method that can find the child item in a menu. The below code works but is not exactly elegant or scaleable. Is there another way to find the path to child menu item that could ...
6
votes
1answer
73 views

Sign In or Sign Up - either way don't repeat yourself

I have one application with two views. One to sign in and one to sign up. Each view has an Email entry as main identifier. I want to add some itemTemplates to my application, because for now I repeat ...
2
votes
1answer
5k views

Implementation of a singleton HttpClient with generic methods

I need advice for this implementation that I made for a service access portable class library referenced to Xamarin.Android and Xamarin.Ios projects. For now, it works fine, but I have doubts about ...
2
votes
2answers
887 views

Change object property in nested list based on a keyword

I have these classes: ...
1
vote
4answers
345 views

Validating user input in C# coming from XAML controls

I have page where I am inserting some data into Entry fields. For each Entry I have written in XAML different controls with parameters. One of them is Formated parameter where I am giving a string ...
0
votes
1answer
38 views

Generating Table Sections from A Property in a List of Objects

I'm working on a Xamarin application and I'm presenting a list of objects in a TableView that are grouped by a specific property of the object. The property is a date. For each distinct date, I am ...
2
votes
1answer
94 views

Xamarin.Forms request / Failed request function

I've wrote a little iPad app with Xamarin.Forms. What I'm trying to do here is send some support tickets via a request to my server. I'm also keeping the "Failed" tickets in a collection so that I can ...
4
votes
3answers
2k views

Generic WebRequest Method for .PCL

I have created this method to do all my WebRequests. Generally my question is, if this could be improved in any way. As a side question, I would like to know if it be better to create methods for ...
2
votes
1answer
1k views

IEnumerable to typed Dictionary

Scenario A portable controls/widgets library for Xamarin.Forms (PCL Profile 111) contains a combobox/dropdown/picker control where the ItemsSource property is an <...
2
votes
1answer
9k views

Changing visibility of ToolbarItem - Xamarin.Forms

I want to fill collection of ToolbarItems from XAML, but change visibility of some ...
2
votes
1answer
6k views

Xamarin image download and resizing for Android

This code addresses performance issues specific to Android running Xamarin / C# when downloading images (BMP/PNG) into a listview. The caller simply specifies the URL to fetch the image from, and the ...
4
votes
1answer
693 views

Showing items and categories after clicking on a subcategory

How can I speed up my app? It's very slow if I click on a button and open a new page. All data in time is local. I'm not sure if the problem is in my code or xamarinu. ...
4
votes
1answer
366 views

Reacting to Boolean state in reactive ViewModels

When this ViewModel loads we kick off the IsAuthenticatedCommand: If the result of ...
12
votes
1answer
1k views

Small android app that gives a movie based on the chosen genre

Working on my first "big" project using the mighty Xamarin. Likewise my first venture in XAML so I suppose most focus will be going towards these new areas. Performance- and user-experience related ...