I believe the problem is with the variable EnterActivityOptions
When I look into your code sample it's look like you assigned some value to EnterActivityOptions
in the method of setEnterActivityOptions
But I am not sure that this method is calling when you invoke the activity.
if it's not calling the method then obviously it will not be initialized and the variable value will be null this results NullPointerException.
So, to resolve this issue please try to check the case whether EnterActivityOptions
is null or not and then use the condition
if (mEnterActivityOptions.isReturning()) {
Your code will place here
}