Bug 53981 - Android.App.Application subclass no longer created/instanced if OnCreate override does not exist in class
Summary: Android.App.Application subclass no longer created/instanced if OnCreate over...
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 7.2 (15.1)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-03-25 21:24 UTC by RobertN
Modified: 2017-08-23 21:15 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description RobertN 2017-03-25 21:24:11 UTC
Xamarin.Android Version: 7.2.0.2 

I have been using Android.App.Application subclasses prior to 7.2.x without any issues:

	[Application(LargeHeap = true)]
	public class BOMBApplication : Application
	{
		public BOMBApplication(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
		{
			Initializer();
		}
                 
                ~~~
         }

Now, the Application subclass is no longer constructed UNLESS there is an OnCreate() override in the class.(?)

Add the following to the class and the application object is properly created:

		public override void OnCreate()
		{
			base.OnCreate();
		}

Is this a breaking change that I missed in the docs? or a bug?
Comment 1 Prashant [MSFT] 2017-07-05 09:02:21 UTC
Thank you for taking the time to submit the bug. We are unable to reproduce this issue. Please attach a reproduction to the bug by starting with a clean Xamarin.Android project and adding just the code necessary to demonstrate the issue.
Comment 2 Cody Beyer (MSFT) 2017-08-23 21:15:35 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!