onConnectinDone more than once

0 votes
Hi I am developing game in android using app wrap SDK.

1. I used connectWithUserName() method in class.

When i called this class onConnectionDone method called.

When i called this class again onConnectionDone called twice and so on. I want onConnectionDone method called once when connectWithUserName method called.

2. I used connectWithUserName() in one other class also.

When connectWithUserName() of one class called then onConnectionDone() mehod called of both the classes i want onConnectionDone() method called only of that class in which connectWithUserName() method called. Waiting for your response ASAP.

 

Thanks,
asked Jul 12, 2014 in App42 Cloud API-BaaS by bhawani_singh (10 points)

1 Answer

0 votes
Our SDK follows the observer pattern for listeners.

http://en.wikipedia.org/wiki/Observer_pattern

Double notifications is commonly the case if you have added your listener object more than once to the WarpClient singleton. This can happen for example if you call addListener in onStar() but don't remove it in onStop(). Do check how and when you are adding/removing the listeners.
answered Jul 14, 2014 by dhruvc (1,099 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...