FAQ Database Discussion Community


Expanding the size of ListView cell on tap

xamarin,xamarin.forms
I'm trying to implement a solution to increase the size of a ListView Cell when tapped using Xamarin Forms (and custom renderers if required). I'm still pretty new to C#, and the idea of data binding is still a little unclear to me, however, it seems like that is the...

Why the 20px gap at the top of my UIViewController?

ios,layout,uiviewcontroller,xamarin
The Problem Consider the following controller hierarchy: UINavigationController UIViewController UITableViewController The presence of the UIViewController is affecting layout. Without it, the UITableViewController takes up the entire bounds of the UINavigationController: However, if I add a vanilla UIViewController between the UINavigationController and UITableViewController, a 20px gap appears between the top of...

Google Maps URLs showing up blank in Xamarin webview on Android

android,ios,webview,xamarin,monodroid
I'm not trying to use the Google Maps API, just trying to display a standard Google Map URL in a webview inside of my app. For example - https://www.google.com/maps/place/Disneyland+Park,+1313+Disneyland+Dr,+Anaheim,[email protected],-117.918974,17z/data=!4m2!3m1!1s0x80dcd7d12b3b5e6b:0x2ef62f8418225cfa When I load that URL, I just get a blank page (works properly on iOS). I've been researching for a couple...

How to install Xamarin for Visual Studio 2015 when Visual Studio 2013 is installed too?

visual-studio-2013,xamarin,visual-studio-2015
I install both Visual Studio 2013 and 2015. I need install Xamarin for VS 2015. But I can't do it because by default it's installing for VS 2013.

Use Tab with new ToolBar (AppCompat v7-21) in mvvmcross

android,tabs,xamarin,android-toolbar
I have use support_v7 Toolbar as ActionBar, but i getting problem to add tabs in my activity. Is there any example to add tab with toolbar. I took a look at http://blog.ostebaronen.dk/2013/11/getting-support-v7-working-with.html

Registering UITableViewController causes an exception in loadView method

c#,ios,uitableview,uiviewcontroller,xamarin
I'm experimenting with the UITableViewController class in Xamarin and found that when creating a new ViewController in Visual Studio and changing the base-class from UIViewController to UITableViewController, the application crashing upon start with the following exception. My ViewController basically looked like this: [Register("MyViewController")] public class MyViewController: UITableViewController { public override...

Where is the android signing key on the disk that Xamarin Studio creates?

android,xamarin,xamarin-studio
I'm publishing using a key that I created in Xamarin Studio. Where is that key on the disk so I can take a backup of it?

Offline authentication best practices in Xamarin

c#,xamarin,monotouch
I intend to create a Xamarin(.Forms) application, and it has to have authentication: the user should provide a username and password to obtain data. The problem is that it has to work offline as well (meaning it shouldn't rely on a server for the authentication process). I considered the following...

mono - xamarin studio System.MissingMethodException

xamarin,monodevelop
As the title says when I start the project it gives System.MissingMethodException but then I hit refresh on browser and it works. What is the problem with first start ? .net 4.5 and mvc 4 System.MissingMethodException Method 'HostingEnvironment.get_InClientBuildManager' not found. and also System.Web.Entity not found in references and also after...

Xamarin iOS AdHoc Error attempting to JIT compile

xamarin,mvvm-light
I have an app built using the AdHoc profile and deploying to my phone. I have all options ticked (LLVM, Thumb-2, Generic value type sharing). If I use the Linker option of "Dont Link" then it deploys to the device fine and works. If I use "Link All Assemblies", which...

Xamarin.Forms Maps crashing app

google-maps,xamarin,xamarin.forms
I'm having a hard time trying to show a map on my Xamarin Forms app. This is the error I get everytime I open the page with the map: 0x29 in System.Diagnostics.Debugger.Mono_UnhandledException_internal C# 0x1 in System.Diagnostics.Debugger.Mono_UnhandledException C# 0x6 in Android.Runtime.UncaughtExceptionHandler.UncaughtException at /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/monodroid/src/Mono.Android/src/Runtime/UncaughtExceptionHandler.cs:35,4 C# 0x1C in...

upgrading SQLite-net to SQLite.net - create SQLiteConnection

xamarin,database-connection,sqlite-net
I used to open my SQLiteConnection in my shared project as following: var conn = new SQLiteConnection("MyDb.db3"); The constructor has been changed to the following signature: public SQLiteConnection(ISQLitePlatform sqlitePlatform, string databasePath, bool storeDateTimeAsTicks = true, IBlobSerializer serializer = null, IDictionary<string, TableMapping> tableMappings = null, IDictionary<Type, string> extraTypeMappings = null, IContractResolver...

How to run mtouch command to launch Xamarin.iOS app on simulator for automated testing?

testing,xamarin,monotouch
I am new to Xamarin and I need to be able to launch a Xamarin iOS app on iOS simulator from command line. I have tried running mtouch but obviously am missing on something as I am not able to successfully launch the app on simulator. I don't know if...

How to define half of the screen size in XML

android,xml,xamarin
I have the following code which is written programmatically, Display display = this.WindowManager.DefaultDisplay; Point size = new Point(); int height = size.Y; bViewLayout.Height = (int)(height * 0.5); However, I wonder how I could achieve half of the screen in Xml rather than hard coded as follows? <GridLayout android:layout_columnSpan="1" android:layout_gravity="fill" android:layout_rowSpan="1"...

The runtime version supported by this application is unavailable during app startup

xamarin,monotouch
I'm getting the following lines on app startup. Application works fine though: Jun 22 18:29:54 Alexeys-iPod-touch xxx[1169] : WARNING: The runtime version supported by this application is unavailable. Jun 22 18:29:54 Alexeys-iPod-touch xxx[1169] : Using default runtime: v4.0.30319 What should I do about it (and should I)?...

TeeChart bottom axis labels are cut off in iOS

ios,xamarin,teechart
I'm building an iOS app (unified) using Xamarin. I'm also using TeeCharts. I have a very simple bar chart whose bottom axis labels are rotated by 90 degrees (vertical labels). The bottom axis shows dates (10 days, starting from today). I've also set the date format to "MM/dd". Here's my...

RestSharp.Portable HttpRequestException 500 (Internal Server Error) on iOS POST Request

ios,web-services,rest,xamarin,restsharp
I am using the RestSharp.Portable PCL because I am building a cross-platform service manager that will wrap and make calls to RestSharp regardless of the platform I am on. I am trying to POST data using a Xamarin iOS unit test project and I can successfully make GET requests but...

is possible to convert any code in native android to xamarin.android ?

xamarin,monodroid
I was a Android developer and now I am studying Xamarin , but I always ask myself "can I convert all android(ios) code to xamarin.android(xamarin.ios) ?" because I know c# is similar to java . However , they still have a few differnt syntax . Someone can help me answer...

Accessing Activity Methods from WebChromeClient

javascript,android,xamarin,webchromeclient
I am using Xamarin to write an Android application, and in that application, I have a webview that needs to load at the creation of the app and after it is fully loaded, I call some javascript into the HTML page to set up the graph. I am trying to...

how to put a private use character in string with xamarin

c#,fonts,xamarin,monotouch,monodroid
I want to use some icons from the metro font (http://metroui.org.ua/font.html) on my Xamarin project, I can't find a solution to put a character in private use on my string, it's always replace by a square with a ? inside. If anyone know how I can put special character, it...

Resolution-dependent font size in Xamarin

xamarin
I am new with Xamarin and struggling with my first application. I have an image with an entry view above it. This way I create a custom entry background. The font size of the entry won't scale with different devices with different resolutions though. When I adjust the font size...

Using Android Toolbar

android,xamarin,android-toolbar
I'm following the following tutorial to implement the toolbar: http://blog.xamarin.com/android-tips-hello-toolbar-goodbye-action-bar/ When I write this code some things cannot be resolved. protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); SetContentView (Resource.Layout.Main); var toolbar = FindViewById<Toolbar> (Resource.Id.toolbar); //Toolbar will now take on default Action Bar characteristics SetActionBar (toolbar); //You can now...

How can I format phone numbers using Xamarin for Android?

c#,android,xamarin
How can I format phone numbers using Xamarin for Android? I tried this code: EditText inputField = (EditText) FindViewById(Resource.Id.editMensagemTelefone); inputField.AddTextChangedListener(new PhoneNumberFormattingTextWatcher()); ...

Azure mobile service pullasync not retrieving data

c#,android,azure,xamarin
I've followed all the steps described in this tutorial (for Xamarin Android) but after I query the toDoTable like this var items = await toDoTable.Where(x => x.Complete == false).ToListAsync(); at the end of OnCreate() I can't acces the data stored to the cloud, only the data that I added before...

Xamarin App crashes on Reopen NullReference

c#,android,xamarin,crash,activity-lifecycle
I have an app on Xamarin, it works fine, if I press back button, to move to main menu it hides in app stack, so when I open it back from app stack it suddenly crashes with NullReference 06-10 15:59:57.363 I/MonoDroid(14891): UNHANDLED EXCEPTION: 06-10 15:59:57.363 I/MonoDroid(14891): System.NullReferenceException: Object reference not...

Binding BarBackgroundColorProperty in Xamarin.Forms

c#,xamarin,xamarin.forms
I'm relatively new to C# and the idea of data binding (that is, I'm not sure I completely understand it). I am looking to try to bind NavigationPage's BarBackgroundColorProperty for sake of being able to change my root page's bar background color multiple times for a theme feature I'm trying...

Xamarin Tesseract OCR binding for Android

xamarin,monodroid,ocr,tesseract
I would like to use tesseract ocr for Xamarin.Android and Xamarin.iOS applications. I found the binding for iOS (https://github.com/jherby2k/Xamarin-Tesseract-OCR-iOS-Unified). Is there an equivalent for Android ?...

Running on iOS 7.1 simulator brings errors in the console output

ios,xcode,xamarin,mono,monotouch
I'm using Xamarin Studio 5.9.3 on Mac with Mono 4.0.1, Xcode 6.3.2 and Xamarin.iOS 8.10.1.64. When I try to run my app in the iOS 7.1 simulator I get the following console output: objc[1102]: Class AXEmojiUtilities is implemented in both /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities and /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS...

ServiceStack Authenticates both iOS Apps when one is logged in

rest,xamarin,servicestack,restful-authentication,servicestack-auth
I'm using the awesome ServiceStack to implement my REST backend which serves two iPhone apps written in Xamarin. Everything works great but i'm struggling in getting sessions to work correctly when the two apps are installed on the same device ! The issue is that if I login in one...

Xamarin lost custom objc categories (unrecognized selector sent to instance) on device only

c#,ios,xamarin,monotouch
The situation: I have a custom category defined in my objc static library: @implementation UIViewController (Colorful) -(void)changeColor:(UIColor *)color { self.view.backgroundColor = color; } @end It is bind to Xamarin project: [Category, BaseType(typeof(UIViewController))] interface UIViewController_Colorful { [Export ("changeColor:")] void ChangeColor(UIColor color); } This category is used in code like this: public...

Geocoder class gives wrong coordinates and won't parse coordinates to get street address. Xamarin

android,google-maps,xamarin,monodroid
I typed in the code from http://developer.xamarin.com/recipes/android/os_device_resources/gps/get_current_device_location/ and I keep getting the coordinates for the Xamarin office in San Francisco as my current location when I run the app. I have installed the Google Maps apk on my Nexus 4 (KitKat) API 19 emulator and Google Maps displays my current...

How load binary images in Xamarin

image,forms,xaml,binding,xamarin
I'm working with Xamarin Forms and I want to load a listview with imagecells, also I'm binding the data with XAML. My webservice provider returns me the binary code of the images, ¿someone knows how I can convert this to show the image? This is my XAML listview template: <ListView...

Xamarin.Android and Parse

c#,parse.com,xamarin,monodroid
I am writing an app with C# and Xamarin.I am using Parse at the backend.I am currently stuck at point where when a user clicks signup button my app checks for a user with same phone number in parse database.Ideally If app finds app makes a toast of "cannot signup".If...

how to add a windows phone project to existing Xamarin.Forms project

c#,android,ios,windows-phone-8,xamarin
I created a Xamarin.Forms Shared project in Xamarin Studio, so it did not add iOS or windows Phone project so I added it from Visual Studio then I added Xamarin.Forms package from nuget to both project now when I try to add the shared library to both ios and winphone...

Xamarin creating “Xamarin Form PCL” app

c#,ios,xamarin,xamarin-studio,xamarin.mac
Hi I am relatively new to Xamarin, and I found this project type called PCL which imports all of the references I need. But when it gets built it doesn't seem to come with any platforms just the simple solution seen below in the picture. Therefore this means I cant...

TableView Header Section Covers The Rows

xamarin,tableview,xamarin.forms
I have two questions: 1- I'm trying to do a simple table view with Xamarin forms, but i have found that the header sections cover the below cells (rows in table). I just wants that the header section disappears like the cells when move the page and just maintain de...

namespace prefix “myapp” is not defined in Xamarin While Building App?

android,xamarin,monodroid,xamarin-studio
I want to build a Toolbar in Xamarin app. When i want to create a menu it shows me error saying that "namespace prefix "myapp" is not defined". Here is code. <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res/android-auto"> <item android:id="@+id/action_reply" android:icon="@drawable/ic_action_reply" android:title="Reply" myapp:showAsAction="always" /> <item android:id="@+id/action_undo" android:icon="@drawable/ic_action_undo" android:title="Undo"...

HTTPNetStreamInfo::_readStreamClientCallBack(__CFReadStream*, unsigned long) increases memory allocation

ios,memory,memory-management,xamarin,httpclient
I am trying to download large video file with httpClient post method. I am working Xamarin.iOS, but it seems to be issue of iOS (NSURLConnection/session) as the Xamarin codes convert it into native one. My device is having IOS8.1. A memory is kept increasing when I try to download that...

Xamarin Forms Android Error: Please install package 'Android Support Library'

xamarin,monodroid,android-support-library,appcompat,xamarin.forms
I recently uploaded my project to Git, and used a auto-generated Xamarin/Windows/MacOS/VisualStudio .gitignore file. I did a lot of work and testing on iOS, but now I'm coming back to android but upon building the Project.Droid version, I get the following errors: Error 11 Please install package: 'Android Support Library'...

Uploading an IMG file through RestSharp

c#,xamarin,restsharp
I have the code: request.AddFile ("image_request[image]", ("picture.jpg"); The "image_request[image]" is required for the specific API. The "picture.jpg" is in my /resources/ folder and correctly works. However, with my application, I do not have a file stored locally. I take a picture with the camera app and have it stored as...

Getting most accurate timestamp for accelerometer data for microsoft band on iOS

ios,xamarin,microsoft-band
I am using the Xamarin.Microsoft.Band and Xamarin.iOS, trying to read accelerometer data of the microsoft band on iOS. I got the band client connected and reading 3-axis data. however, it seems the (BandSensorDataEventArgs) from Xamarin.Microsoft.Band doesn't have timestamp data. Is that true? Anyway to get the timestamp?

How to wait for a return value from an event handler without blocking main UI thread

c#,multithreading,asynchronous,xamarin,event-handling
So I have this method this uses a library to generate an external webpage to allow the user to enter their Facebook credentials for verification. Upon entering it we are creating a profile based on the that user's account and saving it to a database. Once we save it to...

Connecting Python Backend to Android APP

python,xamarin
How to use python as a backend for an Android App that is built using C#? The Python Backend is written using the Flask framework. The Android app is built using xamarin.

Why is my app requesting permissions I didn't ask for?

android,xamarin
my APK is requesting these permissions: android.permission.ACCESS_NETWORK_STATE android.permission.BIND_NOTIFICATION_LISTENER_SERVICE android.permission.INTERNET android.permission.READ_EXTERNAL_STORAGE android.permission.READ_LOGS android.permission.WRITE_EXTERNAL_STORAGE I can see that when I try to publish the APK on the play store or when I try to install the APK on my physical device. However, my app manifest only has: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission...

Searching in grouped ListView in Xamarin.Forms

c#,listview,xamarin,observablecollection,xamarin.forms
Background I followed this guide to create a grouped ListView in Xamarin.Forms. Doing so, the following Property is given which is bound as the ItemSource of the ListView: DevicesGrouped = new ObservableCollection<Grouping<string, Device>>(sorted); Everything works just fine, including the grouping functionality. To search (and thereby filter) the entries in the...

Xamarin: How to implement NSDictionary with YES

c#,ios,objective-c,xamarin,monotouch
I need to create a NSDictionary in Xamarin/C# with YES Value. The NSDictionary in Objective-C looks like this: NSDictionary *requestSettings = @{ kKeyOne : @YES, kKeyTwo : @YES }; I have no idea where in Xamarin I can find the YES keyword....

Microsoft Office 365 Developing in iOS

c#,ios,xamarin,office365
I want to use Office 365 in my project, but when I try to add, I get this error I have a Xamarin.iOS project but can't add it.. This topic says that I can use Xamarin.iOS also The following projet templates support adding Office 365 APIs as a connected service:...

Building C# code in VSCode on Mac

c#,osx,xamarin,command-line-interface,vscode
I've been building a command line tool using Xamarin. After being told about Visual Studio Code, I wanted to see if I could try using it as an editor and debugger. I managed to get it to debug an existing .exe file built with Xamarin, by editing the launch.json file,...

Unable to reference Xamarin.Forms in brand new project

c#,xamarin,xamarin.forms
I am trying to write a Xamarin Forms example for the PCL based socket implementation. The project will not build due to not being able to resolve 'Forms'. The Project is brand new (5/27/2015) and I have yet to add any custom code or packages to it. I am using...

Running a script within a C# program

c#,xamarin
Is there an easy way (a library) that is available for evaluating a .js (or C# or any scripting language for that matter) expression within a compiled .net C# program that is PCL compatible? Or in general, is there a scripting language that one can run within a compiled C#...

Xamarin MvvmCross ViewModel Validation

validation,mvvm,xamarin,mvvmcross
I'm building my first Xamarin MvvmCross application at the moment and I'm currently looking at validating user input to the view models. Doing a lot of searching around everything (including the MvvmCross team) link to this plugin: MVVMCross.Plugins.Validation This plugin makes use of a very old version of MvvmCross v3....

Xamarin iOS Bluetooth Low Energy - CBPeripheral.UpdatedCharacteristicValue reading TX characteristic shows unexpected data

ios,bluetooth,xamarin,bluetooth-lowenergy,cbperipheral
I recently received a BLE device for Bluetooth to Serial. It uses TruConnect and I'm trying to get it to communicate with my serial device. The serial device receives communication over a serial cable and echoes back anything that is sent to it as well as any results from a...

Get local url for MvxStandardTableViewSource ImageUrl

binding,xamarin,mvvmcross
I am trying to bind my viewmodel to the MvxStandardTableViewSource. My binding text: "DetailText MyDetail; TitleText MyTitle; ImageUrl MyImage" My ViewModel public class MyViewModel : MvxViewModel { public string MyDetail { get; } public string MyTitle { get; } public string MyImage { get; } } I got the DetailsText...

Camera Preview and OCR

xamarin,monodroid,android-camera,ocr,tesseract
I am new to android development - I'm using Xamarin. I am trying to write an application that initiates the camera preview, and then constantly scans the incoming frames for text (I am using Xamarin.Tesseract from NuGet). In other words, I don't want to make the user take a photo...

Xamarin : Loading resources via GetManifestResourceStream

opengl-es,xamarin,monotouch,xamarin.forms
I am working on a Xamarin forms project to use OpenGL/OpenTK. I am trying to load a shader using GetManifestResourceStream. Whatever I do I get null code is being run from .Shared project, shaders are in .ios / .Android resources directory string prefix; #if __IOS__ prefix = "OpenGLTesting.iOS."; #endif #if...

Crash when picking a contact from address book in Xamarin iOS 8

c#,ios,xamarin,abaddressbook,addressbookui
I have been experiencing a crash in my app when I select a contact from the address book in the simulator. I’m getting a similar crash when I use the QuickContacts sample. These are the steps after starting the QuickContacts app in the simulator: Select Display Picker Select John Appleseed...

Error in build from Dockerfile for Ubuntu image with Mono installed

xamarin,mono,docker,ubuntu-14.04,boot2docker
I have the following docker file that I am attempting to use to build a Ubuntu image with mono. FROM ubuntu:14.04 MAINTAINER John Smith <[email protected]> RUN sudo apt-get update RUN sudo /bin/bash -l -c apt-get install wget RUN sudo /bin/bash -l -c apt-get http://download.mono-project.com/repo/xamarin.gpg RUN sudo apt-key add xamarin.gpg RUN...

How to handle async & await with default override's

c#,android,asynchronous,xamarin,async-await
In a Xamarin project, Android - I am new to android development. While working on a activity, in the OnCreate method am setting a custom Adapter for a ListView. protected async override void OnCreate (Bundle bundle) { base.OnCreate (bundle); SetContentView(Resource.Layout.Main); var listAdapter = new CustomListAdapter(this); //................................................. listView = (ListView) FindViewById(Resource.Id.list);...

CLLocation DistanceFrom performance implications

ios,iphone,xamarin,monotouch
I'm developing an iOS application where I need to track the distance walked by the user real-time and alter data accordingly. Essentially what I'm doing is, as soon as the user makes a move, I check the distance between the original and current positions and react accordingly (using CLLocation's DistanceFrom...

InvalidCastException in release when casting TextFormatted to ISpannable or ISpanned

c#,android,xamarin,monodroid
This question is the same but it doesn't seem to answer the question as to why this cast fails in release mode but works in debug. The Android docs specify: Return the text the TextView is displaying. If setText() was called with an argument of BufferType.SPANNABLE or BufferType.EDITABLE, you can...

Xamarin Forms Relative Layout won't stack

c#,xaml,xamarin,relativelayout,xamarin.forms
With the following code: <ScrollView Orientation="Vertical" Padding="0"> <RelativeLayout BackgroundColor="Red" Padding="0"> <BoxView Color="Blue" WidthRequest="100" HeightRequest="100" RelativeLayout.XConstraint="{ConstraintExpression Type=Constant, Constant=0}" RelativeLayout.YConstraint="{ConstraintExpression Type=Constant, Constant=0}" /> </RelativeLayout> <RelativeLayout BackgroundColor="Green" Padding="0"> <BoxView Color="Yellow" WidthRequest="100" HeightRequest="100"...

Any way to use EmbeddedNativeLibrary?

xamarin,nativelibrary
In a Xamarin Solution, I have: Project 1: An Android application project (application). I had an old Android application using three .so, built as AndroidNativeLibrary. This worked well and .so were found. I wanted to make a library from it. For this reason, I've made a new Library project. Now,...

IOS CABasicAnimation save view to latest position when animation ends

ios,animation,xamarin
How to save latest position of animated view? here is my code, generally my aim is to rotate view about 60 degree in z axis. CABasicAnimation rotationAnimation = new CABasicAnimation (); rotationAnimation.KeyPath = "transform.rotation.y"; rotationAnimation.From = new NSNumber (0); rotationAnimation.To = new NSNumber (0.7); rotationAnimation.Duration = 5; rotationAnimation.AutoReverses = false;...

Via rotate orientation change layout without reload OnCreate()

android,xamarin,mono,orientation
I have 3 Layouts in different folders : 1.layout/HomeLayout.axml (where layout is an folder for layouts and HomeLayout.axml is an global axml file). 2.layout-large-port/HomeLayout.amxl (where layout-large-port is an folder for large(dimension of display) portrait and HomeLayout.axml is axml file). 3.layout-large-land/HomeLayout.axml(where is layout-large-land is an folder for large(dimension of display) landscape...

Converting Data Trigger XAML to C#

c#,wpf,xaml,xamarin
<Image Width="16"> <Image.Style> <Style TargetType="{x:Type Image}"> <Style.Triggers> <DataTrigger Binding="{Binding Value}" Value="False"> <Setter Property="Source" Value="Resources/image1.png"/> </DataTrigger> <DataTrigger Binding="{Binding Value}" Value="True"> <Setter Property="Source" Value="Resources/image2.png"/> </DataTrigger> </Style.Triggers> </Style> </Image.Style> </Image> Referring to the XAML code above, I'm confused in how to convert it...

How to 'await' a listener properly? Replacing a hacky spin-lock solution

c#,xamarin,async-await
I am working on a xamarin project with a partner. Xamarin allows the use of C# in coding for iOS or Android. Here is an example of some code a coworker wrote that I feel could be done in a substantially better way: alert = new AlertDialog.Builder (Act); alert.SetOnDismissListener(new OnDismissListener(()...

ViewPager that listens to clicks

android,xamarin,android-viewpager
I need a ViewPager that enables to user to swipe images. But on a click on the images, a new activity has to start with another, bigger viewpager that contains the same images. How can i implement a click listener while still keeping the swipe on the viewpager?...

BitmapFactory.DecodeByteArrayAsync JPEG is 77KB resulting Bitmap is 1.6MB

android,bitmap,xamarin,jpeg
I'm downloading some regular JPEG files and I have verified the file size. They are 77KB and can be viewed in my browser. ImageBytes.Length verifies this file size. However, imageBitmap.byteCount is 1638400 bytes. What am I missing? BitmapFactory.DecodeByteArrayAsync creates usable files, but they are huge. public async static Task<Bitmap> GetImageBitmapFromUrl(string...

Updating Xamarin app with servicestack

xamarin,servicestack
where is IosPclExportClient?? I used to use PclExport.Configure(new IosPclExport()); But I have no idea what happened to IosPclExport - Now I see people are using IosPclExportClient.Configure(); But IosPclExportClient isn't available?! Why does all this have to change all the time?!...

xamarin.forms.labs ImageButton issue

xaml,xamarin,monodroid,xamarin.forms
I am using Xamarin.Forms and a Monodroid project. I use Xamarin.Forms.Labs to render an ImageButton control. Everytime I try to render the control in xaml I get this exception: System.TypeInitializationException: An exception was thrown by the type initializer for Xamarin.Forms.Labs.Controls.ImageButton ---> System.MissingMethodException: Method 'BindableProperty.Create' was not found. Here is the...

Recyler view listitem image onclick

android,xamarin
I am working on xamarin android apps. I used recycler view for displaying the images in each row. Now for each item image there is some link which I need to redirect. How can I achieve this onclick action for each image in recycler view. Please help me in this...

Is there any way to use a pre-existing database from Xamarin without copying it from Assets?

android,xamarin,xamarin.forms
I have a rather large SQLite database (~20 mb) I need to access from my Android Xamarin-Forms app. Everything online I've read says you can read the database by copying it to the filesystem first. For example, this question. However, won't that mean the large database is duplicated, wasting users'...

How to compile JAR for the SuperSLiM library?

android,xamarin,android-gradle,build.gradle,superslim
I'm an android newbie, and would like to create a jar file for this library: https://github.com/TonicArtos/SuperSLiM I've read some other online answers which say that the gradle build file has to be modified, which I tried to do, but not sure if I did it correctly: How to create a...

Floating Action Button in Xamarin.Forms

android,xamarin,monodroid,xamarin.forms,floating-action-button
I had completed my App's home page in Xamarin.Forms Portable. Now i want to add a Flotation Action Button In my Android Project ! Is there any way to add FAB for Android in my existing home page, which was coded in Xamarin.Forms Portable. OR I want to create a...

How can I use animation in xamarin android application?

c#,android,xamarin,titanium-android
I want to use animation in my android Application using Xamarin C#. animations like fade-in, zoom-in, move and ....

Exception when launching activity from PreferenceScreen

android,xamarin,monodroid,android-preferences
I'd like to launch an activity from a preference screen. This already did work in the past and I haven't changed any code but updated the Android SDK (updated packages and installed new ones) and since then it doesn't work anymore. I get an exception that the activity could not...

Application can't run in Samsung S6

c#,android,xamarin,monodroid
I have a Xamarin.Android App compiled and packaged. It works on any device Blu Dash 3.5, Samsung S5 and inferior, Hummer, etc. In Xamarin Studio I go to Options --> Application Build --> Advanced --> Supported ABIs and mark all of them: armeabi armeabi-v7a x86 arm64-v8a x86_64 So, I put...

Xamarin: Why do I need a mac to compile the .ipa file when developing for IOS?

c#,osx,xamarin,ipa
I'm just curious. With android all I need are the correct SDK packages and a slow-to-boot emulator. I understand that I do need a mac, I would just like to know why? And why I can't use a VM?...

Using an iPad as the networked Mac for Xamarin.iOS for Visual Studio

c#,ios,ipad,visual-studio-2012,xamarin
This guide explains how to use Xamarin.iOS for Visual Studio and a network available Mac as the host for Apple's complier: http://developer.xamarin.com/guides/ios/getting_started/installation/windows/introduction_to_xamarin_ios_for_visual_studio/ It is possible to use an iPad as the networked Apple compliler?...

Xamarin iOS: Can't fetch record from private database in icloud

ios,xamarin,monotouch,icloud
Want to save a asset to the private database but.... ...my output says every launch "creating file...", so where's the problem at my code? :( (uploading/saving seems to work because "uploaded" appears) var recordID = new CKRecordID("diary"); AppleHelper.PrivateDatabase.FetchRecord(recordID, (record, err) => { // Was there an error? if (err !=...

How to customize Xamarin.Forms app?

xamarin,xamarin.forms
How can I customize the appearence of xamarin.forms components? I want each button to have the same image, for instance. Or for all systems to share the same login screen with the same background image. I know I can do that by adding one specific screen to each platform project....

Show Dialog Fragment in Fragment

android,xamarin,monodroid
How show MvxDialogFragment in MvxFragment. Can not use FragmentMaganer and other solution. No Work public void ShowFragmentLatestInvoices() { var transaction = FragmentManager.BeginTransaction(); var Manager = FragmentManager.BeginTransaction (); LatestInvoicesFragment LatestInvoicesFragment = new LatestInvoicesFragment(); LatestInvoicesFragment.DataContext = ViewModel.InvoiceVM; LatestInvoicesFragment.Show(SupportFragmentManager, "LatestInvoices_fragment"); OnAttachFragment (LatestInvoices); } ...

Return last inserted objectId with Xamarin and Parse.com

c#,parse.com,xamarin
I am new to C# so please be gentle with me. How do I get the objectId of an inserted object with Xamarin and Parse.com var obj = new ParseObject ("TestObject"); obj ["foo"] = "Hello, world! This is a Xamarin app using Parse!"; await obj.SaveAsync(); //Success -> here I want...

UIAlertView popup won't let me swipe up Control Center

ios,xamarin,mvvmcross
I'm currently working on a Xamarin MvvmCross ios app. I have it set to display a UIAlertView popup to inform the user when their internet is disabled (the app requires an internet connection). The problem is that when this popup shows, the user can't swipe up the Control Center to...

MvvmCross RaisePropertyChanged and dot (.) binding

c#,binding,xamarin,mvvmcross
I have a custom binding that accepts entire view model: public class TextViewGroupInfoBinding : BaseBinding<TextView, GroupViewModel> { private IMvxAndroidCurrentTopActivity CurrentTopActivity { get { return ServiceLocator.Current.GetInstance<IMvxAndroidCurrentTopActivity>(); } } public TextViewGroupInfoBinding(TextView androidControl) : base(androidControl) { } public override MvxBindingMode DefaultMode { get { return MvxBindingMode.OneWay; } } protected override void SetValueToView(TextView control,...

How to Add Click event in Stack Layout or Frame

android,ios,xaml,xamarin,xamarin.forms
I am new in xamarin.forms please help me out how i can add click event in Stack Layout or Frame <Frame Grid.Column="0" BackgroundColor="#ffffff" Grid.Row="0" HasShadow="true" OutlineColor = "Black"> </Frame> <StackLayout Grid.Column="0" BackgroundColor="#313FA0" Grid.Row="0"> </StackLayout> ...

Xamarin using cross platform 3D engine

xamarin,xna,cross-platform,monogame
I am a iOS / Android developer who has started to look at Xamarin for Business apps. As a hobby I make the odd 3D game and one thing thats always got me is having to write it for 2 platforms (Yes I do know about Unity, not my bag)...

Xamarin.Forms: GroupHeaderTemplate is not visible, neither are the items but seems to partially render

c#,android,listview,xamarin,xamarin.forms
I have a GroupHeaderTemplate in Xamarin.Forms for a ListView element which is not rendering. You can select the headers, and pull up the quick menu. I can successfully render the groups if I use the property of the ListView element GroupDisplayBinding, yet when I specify GroupHeaderTemplate property of ListView nothing...

Cancel auto triggering value changed event for UISwitch

ios,swift,xamarin,uikit,uiswitch
Is it possible to cancel auto triggering value changed event for UISwitch? I have action of touch up inside event for the UISwitch, I wanna do background job first and then when job is done, i manually turn the switch on instead of it turns itself on immediately after touch...

Grid doesn't expand unless parent element is ContentPage

xaml,xamarin
I am adding a grid element (XFGrid infagistics) to RootLayout <ContentPage> <ContentPage.Content> ... </ContentPage.Content> <Grid x:Name="RootLayout"> </Grid> </ContentPage> This will work fine, however when I place the Grid inside the ContentPage.Content element nothing happens! What is happening here?...

What is the best way to implement icon based custom toolbar with Xamarin?

android,mobile,xamarin,android-actionbar,toolbar
I would like to have a toolbar (actionbar) in my app which looks like the screenshot, basically 4 icons shown on top of the screen with no text: What is the best way to implement icon based custom toolbar with Xamarin? ActionBar with some special settings Custom toolbar layout consisting...

Add ios project to xamarin forms solution with droid project

xamarin,xamarin.forms,xamarin-studio
I've got a xamarin forms solution with a pcl and a .Droid project. Now I also want to add ios to the solution. How do I do this. From the add dialog I can select add new project, but it seems to add a lot more....So the solution was first...

Xamarin: How to print from Android device to dot matrix printer?

c#,android,xamarin,monodroid
I have the following hardware: Dot matrix printer: LX 300-II. Android device with Android version 4.2.2. Connection type: USB, Wi-FI, Bluetooth. I have an Android Activity that create an invoice, so I want to print some text on printer. But I can't make it work. I tried using USBManager with...

Clear Bitmap in Android

android,bitmap,xamarin
I create first chart using bitmap and canvas. How I can clear bitmap for drawing new chart? ImageView imageView = new ImageView(this); Bitmap bitmap = Bitmap.CreateBitmap(w, h, Bitmap.Config.Argb8888); Canvas canvas = new Canvas(bitmap); ... imageView.SetImageBitmap(bitmap); relativeLayout.AddView(imageView); ...

No valid iPhone code signing keys found in keychain in xamarin

ios,iphone,xamarin
I have a Xamarin project in which I am getting Error: No valid iPhone code signing keys found in keychain.. As suggested in this question, I have set Configurations Mappings from iPhone to iPhoneSimulator. And its done as evident in the Build Output. Here is the screenshot: (Dont have enough...

Xamarin doesn't recognise TestCaseSource attribute

xamarin,testcasesource
Xamarin doesn't recognise TestCaseSource, it says : The name TestCaseSource doesn't exist in the current context the way I use it : [Test, TestCaseSource("divider")] I cannot compile because of this....

How to, applicationDidBecomeActive in Xamarin iOS?

ios,xamarin,monotouch,nsnotificationcenter
How do I do this in Xamarin iOS? ViewDidAppear is not called when Opening app from background The link below mentions the OnActivated method for Xamarin in the AppDelegate, but how do I subscribe my ViewController so it knows when the app comes from the background? https://forums.xamarin.com/discussion/10594/where-is-applicationdidbecomeactive-in-xamarin-ios...

Xamarin Forms application architecture

xamarin,monotouch,xamarin-forms
I am developing an app for iOS, Android and Windows using Xamarin forms. From their web site application architecture shared code such as DAL or BL goes in Shared code folder and UI layer in platform specific folders. Looking at the sample code from Xamarin, the UI code is also...

How to disable automatic Nuget Package Update in Xamarin

xamarin,mono,nuget
How to disable automatic Nuget Package updates in Xamarin 5.9 (build 539) when opening a new Project?

Xamarin Google Cloud Messaging GcmClient.CheckDevice(this) causes runtime error

c#,android,xamarin,google-cloud-messaging
So I am trying to register my application with GCM using the Google Cloud Messaging Client component in Xamarin. when ever I run this code in my application, however, it gets a runtime error at the GcmClient.CheckDevice(this) method call. The button is in the main activity and its just so...