What the setVisibleActivities method does?

£可爱£侵袭症+ 提交于 2019-12-22 08:57:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!