Bug 43736 - Missing MessagesOptions.Builder class in Play Services Nearby component v29.0.0.2
Summary: Missing MessagesOptions.Builder class in Play Services Nearby component v29.0...
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Staging (addons.xamstage.com)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jon Dick
Depends on:
Reported: 2016-08-25 08:49 UTC by wannesghielens
Modified: 2016-08-26 14:15 UTC (History)
1 user (show)

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:

Description wannesghielens 2016-08-25 08:49:17 UTC
Already made an issue on GitHub project but that seems pretty inactive: https://github.com/xamarin/GooglePlayServicesComponents/issues/18


Package info: 

Name: Xamarin.GooglePlayServices.Nearby
Version: (= latest stable)
Nuget: https://www.nuget.org/packages/Xamarin.GooglePlayServices.Nearby/

Describe your Issue:

The Builder class from the MessagesOptions.Builder is missing in the wrapper. This makes it impossible to initiate background scanning for BLE beacons without getting the user's consent. These builder classes are in fact included for all the other APIs that are available in the nearby package. The MessagesOptions.Builder seems to be overlooked when testing the wrapper.

Steps to Reproduce (with link to sample solution if possible):

The java code for what I'm trying to achieve (from Google Developers here: https://developers.google.com/nearby/messages/android/user-consent)

mGoogleApiClient = new GoogleApiClient.Builder(this)
        .addApi(Nearby.MESSAGES_API, new MessagesOptions.Builder() // <---- this class is not included in the wrapper
        .enableAutoManage(this, this)
Comment 1 Bill Holmes 2016-08-26 13:31:54 UTC
The issue you filed should be good enough.  I will hand off to the project lead to decide how to handle the duplicate.
Comment 2 Jon Dick 2016-08-26 14:15:00 UTC
I've answered the original issue: https://github.com/xamarin/GooglePlayServicesComponents/issues/18

Here is the answer:
It looks like the setPermissions method was not added as of Google Play Services 8.4.0 (our version, which is why you aren't seeing it available. Though, the MessageOptions class itself does exist both in the java lib, and the .NET binding.

I'm not sure exactly which version the setPermissions method was added, however if you try our latest -PreRelease version of the nuget package, you will find the binding does contain the SetPermissions method you are expecting. The latest prereleases are based off of Google Play Services 9.4.0

Hope that helps!