Ever since upgrading to Android SDK API 19 (KitKat), I'm getting the following error when trying to build my project:
The method setVisibleActivities(String, String) is undefined for the type PlusClient.Builder
If I look at this question, it has a link to the API where apparently this function was documented - but it appears to have simply disappeared from there as well.
Here is the code in question:
PlusClient mPlusClient = new PlusClient.Builder(this, this, this)
.setVisibleActivities("http://schemas.google.com/AddActivity", "http://schemas.google.com/BuyActivity")
.build();
I was able to fix this problem by replacing
PlusClient mPlusClient =
new PlusClient.Builder(this, this, this).setVisibleActivities(
"http://schemas.google.com/AddActivity", "http://schemas.google.com/BuyActivity")
.build();
with
PlusClient mPlusClient =
new PlusClient.Builder(this, this, this).setActions(
"http://schemas.google.com/AddActivity", "http://schemas.google.com/BuyActivity")
.setScopes("PLUS_LOGIN") // Space separated list of scopes
.build();
Errors should be gone now.
You can find more about that here: https://developers.google.com/+/mobile/android/getting-started#step_4_initialize_the_plusclient
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With