Creating a new TwitterSession causing null object reference Error



In my android application, I authenticate using Twitter and navigate to a new Activity.
So when I try to recreate a session/get the already available Session, when I try to use this code

"TwitterSession session = Twitter.getSessionManager().getActiveSession();"

I am getting this error.

“Attempt to invoke interface method ‘’ on a null object reference”

Can someone help me fix this issue.

Twitter.getSessionManager() is null / using fabric-generated ios token

Not sure, but are you using Digits or are you using Twitter.

If you are using Digits, your code should look like this: Digits.getSessionManager().getActiveSession()