passing the GoogleApiClient obj from one activity to another

前端 未结 4 1196
旧巷少年郎
旧巷少年郎 2021-02-19 04:54

I want to be able to update my score for my leaderboard in a different activity other than the one that creates the GoogleApiClient obj ( the main activity ).

What is th

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-19 05:28

    You could use Application class, an android-oriented singleton pattern class and it could be your base class for your ApiClient calls.

    Here is a link to the API documentation, and here are some examples as well as arguments why use Application over Singleton.

提交回复
热议问题