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.
Problem After removing event listner in android
-
- Posts: 1
- Joined: 02 Oct 2018, 16:22
Re: Problem After removing event listner in android
Hi,
I've tested removing and re-adding listeners for the same event in a Java client and was not able to reproduce the problem.
Events are always triggered correctly.
Maybe there's something else going on in your code that is causing the issue?
In any case what version of the Java API are you using?
Thanks
I've tested removing and re-adding listeners for the same event in a Java client and was not able to reproduce the problem.
Events are always triggered correctly.
Maybe there's something else going on in your code that is causing the issue?
In any case what version of the Java API are you using?
Thanks
Return to “SFS2X Java / Android API”
Who is online
Users browsing this forum: No registered users and 56 guests