0

Hi all!

I am trying to listen to plug in/out event for headphones while in background. The problem is that while the events are generated in real-time, I am not able to do handle them in real-time. Whatever code I run in the background gets executed all at once when the user opens the app next time. (some main queue problem?)
I want to send location of the user to a server whenever user plugs out headphone when in background.

What should I do for this? I can't spawn a background thread while in background too (it gets spawned after the user opens the app again). Any ideas?

Thanks in advance!

2
Contributors
1
Reply
7
Views
4 Years
Discussion Span
Last Post by rubberman
0

A lot of this sort of stuff is entirely dependent upon the operating system and development tools and api's you are using. So, answering your question is not possible without knowing a lot more about those things, as well as about whether the application is a GUI-based one, or a service-type application with no direct interface to the system's GUI window manager. If the latter, then we also need to know what window manager you are using, if the system is not an MS Windows one.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.