Hi All,
There is a trange problem I was encount, the client receive twice same event . Is there any people face this issue before?
duplicate event fire
-
- Posts: 50
- Joined: 06 Dec 2016, 06:27
-
- Posts: 50
- Joined: 06 Dec 2016, 06:27
Re: duplicate event fire
To solve this problem, I also add the user variable update event hanlder in server side, but it fires once, is there any thing wrong?
Re: duplicate event fire
Hi,
can you please describe what event is being fired twice? And show the code that generates such event?
Is it possible you've added two listeners for the same event? Thus generating two calls?
Also, please specify the client API platform and version in use.
Thanks
can you please describe what event is being fired twice? And show the code that generates such event?
Is it possible you've added two listeners for the same event? Thus generating two calls?
Also, please specify the client API platform and version in use.
Thanks
-
- Posts: 50
- Joined: 06 Dec 2016, 06:27
Re: duplicate event fire
Please refer the code as below:
after this code, I am trying to reset this variable like below:
But it seems the client didn't receive the clear cmd but twice set cmd. That's the problem. The api which is using in client is version "1.7.0".The server side is "1.6.0". Now I am going to comment the first block code to make it works
Code: Select all
UserVariable uv=new SFSUserVariable("cards", null);
this.getApi().setUserVariables(user,Arrays.asList(uv),true,true);
after this code, I am trying to reset this variable like below:
Code: Select all
SFSArray sfsarray = (SFSArray) existingCardList.getValue();
existingCardList = SFSUserVariable.newInstance(VariableConfig.CARDS_VARIABLE, sfsarray);
ArrayList<UserVariable> list = new ArrayList<UserVariable>();
list.add(existingCardList);
api.setUserVariables(user, list,true,isfireClient);
But it seems the client didn't receive the clear cmd but twice set cmd. That's the problem. The api which is using in client is version "1.7.0".The server side is "1.6.0". Now I am going to comment the first block code to make it works
Re: duplicate event fire
If you're setting twice in your code, you will get two events. This is expected.
Who is online
Users browsing this forum: No registered users and 41 guests