Problem After removing event listner in android
Posted: 02 Oct 2018, 16:44
I am making connection with server in base class the there is landing page ,
matching page and actual game page all using same smartfox object .
I am overwriting extension response in each activity in the start i register listner like this :
sfsClient.addEventListener(SFSEvent.EXTENSION_RESPONSE, this);
and handle event in dispatch method and remove the listner while moving to next activity .
and evrything works fine for the first time for the first time .
if the user clicks on retry ,game activity is called again
I am adding addEventListener again after removal , at this point i am not getting anything in the dispatch .
I have removed and added event listner at the start and end of activity , otherwise my response from the server goes to previous activity.
So my problem is after removing event listner in the same class and re registering I am not able to get repopsnse in dispatch method.
Need Help.
matching page and actual game page all using same smartfox object .
I am overwriting extension response in each activity in the start i register listner like this :
sfsClient.addEventListener(SFSEvent.EXTENSION_RESPONSE, this);
and handle event in dispatch method and remove the listner while moving to next activity .
and evrything works fine for the first time for the first time .
if the user clicks on retry ,game activity is called again
I am adding addEventListener again after removal , at this point i am not getting anything in the dispatch .
I have removed and added event listner at the start and end of activity , otherwise my response from the server goes to previous activity.
So my problem is after removing event listner in the same class and re registering I am not able to get repopsnse in dispatch method.
Need Help.