Since it seems that updating to the latest version of Xamarin Android has altered the nature of this problem, I’ve edited this thread appropriately.
The problem I’m now getting consistently is that described in my second post below: whenever I hit the home button while my game is running, then try to restart, the game hangs during the resume process with a continual sequence of GC_OLD_BRIDGE and GC_MINOR log messages in debug build following the GraphicsDevice.ResetClientBounds log entry (release build just hangs).
This can be replicated in the following manner:
- In Visual Studio 2010, create a new Windows Phone 7.1 project (to get
the empty Game1 class).
- In Xamarin studio, create a new Android application.
- From Monogame 3.2, add the Lidgren and Monogame.Android projects to
- Add references to OpenTK, Lidgren and Monogame.Android in the project
created by the solution.
- Set minimum Android version for the project created by the solution
to 2.2 in the project options
- Add a link to the Game1.cs file created by the VS new project
- Update MainActivity.cs as below:
namespace [your app namespace]
[Activity (Label = “TSTest2”, MainLauncher = true, Icon = “@drawable/icon”)]
public class MainActivity : AndroidGameActivity
protected override void OnCreate (Bundle bundle)
FrameLayout Layout = new FrameLayout(this);
Game1.Activity = this;
Game1 game = new Game1();
- Run the application (should get the blue screen)
- Hit the Home button
- Find and tap on the application’s icon to restart
The application will now hang while trying to resume. This was tested on a Samsung Galaxy S running Gingerbread.