问题
The typical initialization of a PlusClient instance for accessing Google Plus from an Android app is something like this:
PlusClient mPlusClient = new PlusClient.Builder(this, this, this)
.setVisibleActivities("http://schemas.google.com/AddActivity",
"http://schemas.google.com/BuyActivity")
.build();
I do not understand at all this method:
http://developer.android.com/reference/com/google/android/gms/plus/PlusClient.Builder.html#setVisibleActivities(java.lang.String...)
I do not know what are these "activity types", and why they are there, and how are they used by the PlusClient, so I do not know which of them I should use in my app...
回答1:
App Activities are ways for your application to save and share your user's actions to their Google+ account. As per the documentation you linked, there are a number of specific types of activities that correspond with different types of actions your users could take in your application.
回答2:
Finally I realized that it's quite detailed at the end of this video from Google I/O 2013
https://www.youtube.com/watch?v=_KBHf1EODuk
From 27:00
来源:https://stackoverflow.com/questions/16800732/what-the-setvisibleactivities-method-does