Look at the lifecycle of the activity
http://developer.android.com/training/basics/activity-lifecycle/starting.html
onCreate --> onStart--> onResume--> onPaused--> onStopped--> onDestoryed
You call mPlusClient.connect()
in onStart
while you initialize it in onResume
. So mPlusClient
is not yet initialized leading to NUllPointerException
.
So make sure you initialize mPlusClient
before mPlusClient.connect()