Bug 52170 - A Service defined within an Android-based Library will cause two Service entries in manifest
Summary: A Service defined within an Android-based Library will cause two Service entr...
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 7.1 (C9)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2017-02-01 06:32 UTC by RobertN
Modified: 2017-08-23 21:09 UTC (History)
4 users (show)

Tags: bb
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-02-01 06:32:59 UTC
Xamarin.Android Version: 7.1.0.25

Create an Android Library project and add a Android.App.Service to it.

	[Service(Exported = true)]
	public class KeepAliveService : App.Service
	{
           ~~~
        }

Note: In this example I am exporting it as Chrome Tabs needs to be able to call it via an Intent extra for "android.support.customtabs.extra.KEEP_ALIVE"

Include the Android Library project into an Android App project, compile and inspect the generated project:

    ~~~
    <service android:exported="true" android:name="md53facaf42d4b267787bed3d0053111821.KeepAliveService" />
    <service android:name="md59f70a99687498e7ba187118950981d26.KeepAliveService" />
    ~~~

Two(?) Service entries were created, only first one is the correct entry:

   Class.FromType(typeof(KeepAliveService)).CanonicalName == "md53facaf42d4b267787bed3d0053111821.KeepAliveService"
Comment 1 Tom Opgenorth 2017-06-27 16:58:19 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:09:07 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!