You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, I am using Ejabberd Server and Smack library on the client-side( Android Application). When TCP connection closed by android platform due to Network changes or services killed by OS, I am trying to reconnect. Reconnection is happening most of the time.
But in recent released android OS, they have added DOZE mode to restrict apps to run in the background when the device is locked. When the device lost connection with Ejabberd server, the user will be treated as offline. Then I am sending FCM notification through Ejbberd offline hook. I created one API service, where inputs will be coming from Ejabberd offline hook. The same inputs passed to FCM REST API. When I receive the FCM notification on the device, I am connecting to Ejabberd server in the background. But Some android devices(Newer devices) not allowing me to connect to the XMPP server in the background.
I would like to know will this library help me to resolve my issue.
I would be thankful for your suggestions and guidance.
The text was updated successfully, but these errors were encountered:
Hi @karanianandkumar Sorry for the delay. I was making some research because I have not faced that problem before. 1st because we are not using any ejabberd server. Nevertheless I was helping one guy who was doing something similar to you with the python hook. I think you both might face the same problem because it looks like an android limitation.
I asked your question to my android dev friend and he said that maybe you can play with the scheduler with a small task in the background. Have you tried that?
Thanks, @carlosCharz For sharing resources. Yeah almost similar. But if I use Foreground Service in Android, Notification will be always displayed. Which is not good for Chat Application. I am trying to figure out how Whatsapp or FB handling similar situation.
In Some devices those schedulars also not executed (No internet access to My application even though device has internet) until device is unlocked.
Thanks
Currently, I am using Ejabberd Server and Smack library on the client-side( Android Application). When TCP connection closed by android platform due to Network changes or services killed by OS, I am trying to reconnect. Reconnection is happening most of the time.
But in recent released android OS, they have added DOZE mode to restrict apps to run in the background when the device is locked. When the device lost connection with Ejabberd server, the user will be treated as offline. Then I am sending FCM notification through Ejbberd offline hook. I created one API service, where inputs will be coming from Ejabberd offline hook. The same inputs passed to FCM REST API. When I receive the FCM notification on the device, I am connecting to Ejabberd server in the background. But Some android devices(Newer devices) not allowing me to connect to the XMPP server in the background.
I would like to know will this library help me to resolve my issue.
I would be thankful for your suggestions and guidance.
The text was updated successfully, but these errors were encountered: