SmartFox Client maintained until the app is closed

89 Views Asked by At

I have searched all over the net for this but couldn't find any..I want to use a single smartfox client obj and its connection until the user logs out on its own.. I tried this approach..

public class SfsClient extends Application {
   private SmartFox sfsClient = new SmartFox(true);

   public SmartFox getSfsClient() {
      return sfsClient;
   }

   public void setSfsClient(SmartFox sfsClient) {
      this.sfsClient = sfsClient;
   }

}

If i call the sfsclient.connect(h,p) method in the getsfsclient method...the various responses which i want in the different activities in my app..are all acquired in my main activity Extension Response handler..

Say for example..I have Class A as Main and Class B as other activity.. Response for the processes done in Class B should b acquired in Class B Extension Resp..but they are coming in the Extension Resp of Class A..plz help..Thanks in advance..

0

There are 0 best solutions below