Anyone has example of static or global sfsClient.
Anyone has example of static or global sfsClient.
I need a solution, so that a sfsClient can live through interface rotation without disconnecting from server, and be accessible from multiple Activities.
Re:
mmilen wrote:Found a solution by wrapping up client in a Android Service.
Can you share you solution?
Thanks.
Re: Anyone has example of static or global sfsClient.
Hi,
In the app manifest, you need to declare a service. Code its class to handle all SmartFox related operations. Services can be accessed from any app screen, and stay up for as long as the app running to you close it in code. App screen can also subscribe to event listeners so they react to service events. I'm not sure if my terminology is right, this was 10 years ago and I have not done any Android coding since.
Unfortunately, the code I build a while back was proprietary and I don't have access to it anymore.
In the app manifest, you need to declare a service. Code its class to handle all SmartFox related operations. Services can be accessed from any app screen, and stay up for as long as the app running to you close it in code. App screen can also subscribe to event listeners so they react to service events. I'm not sure if my terminology is right, this was 10 years ago and I have not done any Android coding since.
Unfortunately, the code I build a while back was proprietary and I don't have access to it anymore.
Re: Anyone has example of static or global sfsClient.
The code I posted from 10 years ago here: viewtopic.php?f=22&t=12457 is good to this day. App Bridge Baron is still around.
Return to “SFS2X Java / Android API”
Who is online
Users browsing this forum: No registered users and 46 guests