Bug 30612 - Unable to set android:persistableMode as an ActivityAttribute property
Summary: Unable to set android:persistableMode as an ActivityAttribute property
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 5.2
Hardware: Macintosh Mac OS
: Highest normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2015-05-30 12:22 UTC by Peter Collins
Modified: 2017-06-28 15:52 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 for Bug 30612 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Peter Collins 2015-05-30 12:22:12 UTC
We've got an enum[0] for these values, and I would assume that I could use one of those values to set this property in my Activity attribute declaration.

For example:
> [Activity (Label = "test", MainLauncher = true, PersistableMode = ActivityPersistableMode.AcrossReboots)]

[0] http://androidapi.xamarin.com/?link=T%3aAndroid.Content.PM.ActivityPersistableMode

Environment:
OSX Yosemite
XA master / 3ad3823 / 5.1.99.366
Comment 1 Jonathan Pryor 2015-05-31 07:55:37 UTC
What's funny is that Android doesn't document such an attribute:

http://developer.android.com/guide/topics/manifest/activity-element.html

...but it does have an example that uses it:

https://developer.android.com/samples/DocumentCentricApps/AndroidManifest.html
https://developer.android.com/about/versions/android-5.0.html#Recents
Comment 4 Jonathan Pryor 2015-06-02 16:48:28 UTC
Dean: See monodroid/864f08dd for an example of how to implement support for this.
Comment 5 Jon Douglas [MSFT] 2017-06-28 15:52:18 UTC
Marking CONFIRMED as per comments and that Google has officially documented this attribute:

https://developer.android.com/guide/topics/manifest/activity-element.html#persistableMode