xamarin,xna,cross-platform,monogame , Xamarin using cross platform 3D engine


Xamarin using cross platform 3D engine

Question:

Tag: 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 seem to recommend Monogame for 3D work and I have a test project working on iOS / Android (woo hoo).

However, I read that it uses XNA which has according to my .net friends has been dead for years. I also read that MonoGame is moving away from it.

Does anyone know anything about this? If I want to use Xamarin and be cross platform, what should I be using for 3D rendering?

Is it worth trying XNA?


Answer:

Monogame is an open source implementation of the XNA API. It uses the same classes and namespace than XNA but it is a new implementation that is cross-platform.

It used to require the XNA framework for its content pipeline tool. But since version 3.3, Monogame provides its own tool so XNA is not required anymore.


Related:


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...

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,...

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...

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.

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(()...

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...

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"...

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...

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 : 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...

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 do I scale the graphics of a game?


c#,matrix,xna,window,scale
I'm making a game in C# and XNA 4.0. It's pretty much finished, but now I want to add settings so that players can change the window size if they want to. The current setup goes like this: void Initialize() { //The window size is initally 800x480 graphics.PreferredBackBufferWidth = 800;...

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.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...

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...

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...

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

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,...

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...

Score not changing when collision occurs


c#,xna
I have been trying to get my score to work correctly when the player collides with one of the collectibles but the score does not seem to change when the collision occurs, I am not sure why this is happening. In my collectible I have this: class BlueBall : Obj...

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...

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 ....

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?

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....

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...

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...

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)?...

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...

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> ...

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...

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...

How do I apply multiple matrices in spriteBatch.Draw()?


c#,matrix,xna
I'm making a game in C# and XNA 4.0. In some levels I need a camera matrix to make the level appear to scroll left/right. Additionally, I also need a scaling matrix to scale the graphics when the settings are used to change the window size. Both of my matrices...

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...

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...

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...

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 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"...

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 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.

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...

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...

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...

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...

I can't fix camera to any object in a 2D Matrix


c#,matrix,camera,xna,viewport
Problem description: I am trying to develop some 2D game with terrain collision in C# using XNA framework. I have already completed simple terrain generating and object, for example car, can move on this terrain. But now, I get a problem with camera fix to that car. I tried to...

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); } ...

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...

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...

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...

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?...

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....