문제

I am making a application using asmack. i want to ask is that asmack have listeners like chat listeners, message listener and when we create a room there are many listeners realted to the chat-rooms. These listeners runs in the background thread, but will all these listerners will run if app is moved to the background, or we need to make a service class for this?

도움이 되었습니까?

해결책

The listeners will be run within the thread that calls them. This is usually Smack's PacketReader thread. Android Apps are not moved in background, but something similar happens to Android Activities. You still want to use a sticky non-foreground Android service to hold the reference to your XMPPConnection.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top