Bug 45508 - Android workbooks are limited to API 19 (KitKat, 4.4)
Summary: Android workbooks are limited to API 19 (KitKat, 4.4)
Status: CONFIRMED
Alias: None
Product: Workbooks & Inspector
Classification: Xamarin
Component: Agent: Android ()
Version: master
Hardware: PC Windows
: --- enhancement
Target Milestone: Future
Assignee: xamarininteractive
URL:
Depends on:
Blocks:
 
Reported: 2016-10-14 22:17 UTC by Mark McLemore
Modified: 2016-10-20 21:06 UTC (History)
2 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 45508 on Developer Community 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
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
CONFIRMED

Description Mark McLemore 2016-10-14 22:17:28 UTC
Entered the following sample code in a Workbook (Windows 10):

  using Android.App;
  using Android.Widget;
  using Android.OS;

  var rootActivity = StartedActivities.First ();
  Switch mySwitch = new Switch (rootActivity);
  mySwitch.ShowText = true;

When I try to run it, I get the error: "(7,10): error CS1061: 'Switch' does not contain a definition for 'ShowText' and no extension method 'ShowText' accepting a first argument of type 'Switch' could be found.

However, Switch.ShowText is supported by Xamarin.Android:

https://developer.xamarin.com/api/type/Android.Widget.Switch/

Also, I can instantiate a Switch and access its ShowText property without error in Visual Studio.
Comment 1 Sandy Armstrong [MSFT] 2016-10-14 23:12:21 UTC
Although Xamarin docs claim that Switch.ShowText is available as early as API 14 (ICS, 4.0.3), Android's docs reveal the truth: it is not available until API 21 (Lollipop, 5.0).

Currently, the Xamarin Workbooks Android app is built using API 19 (KitKat, 4.4), and does not have access to newer APIs.

This decision was based on what device images were available for Xamarin Android Player, as well as what devices it seemed likely developers would already have installed.

Leaving this open as a feature request. Perhaps we could ship a version built against latest stable Android as well, and let the user get that if they have set up a device for it. Every app we add to Workbooks adds a big hit to install size though.