×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Can I capture - Headphone Plug-out event/notification in WP8 / Lumia 920?

    In my application, which will be playing mp3 music over headphone - can I get "Headphone Plug-out event/notification in WP8 / Lumia 920?" - take some required actions?
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    477

    Re: Can I capture - Headphone Plug-out event/notification in WP8 / Lumia 920?

    This was covered a while ago on StackOverflow, it also applies to WP8...

    http://stackoverflow.com/questions/9...dphones-in-wp7

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: Can I capture - Headphone Plug-out event/notification in WP8 / Lumia 920?

    Quote Originally Posted by theothernt View Post
    This was covered a while ago on StackOverflow, it also applies to WP8...

    http://stackoverflow.com/questions/9...dphones-in-wp7
    Got it - it say's - "when a song is playing on a background AudioPlayerAgent and the user unplugs the headphone, the AudioPlayerAgent receives a pause UserAction and pauses the music"

    Will the same Pause action/method will be called on the background Audio player - in case of a incoming call also ?

    If yes, how to identify it that - this pause is called from headphone plugout event not due to any other reason ?

    In my app -- I wish to launch some kind of SOS actions from a background app which is playing music - in case the headphone is plug-out -- while the user is listening to music.... but for this I have to uniquely identify this event......!!! Can I ?
    Last edited by im2amit; 2013-02-17 at 02:58.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    477

    Re: Can I capture - Headphone Plug-out event/notification in WP8 / Lumia 920?

    Short answer is: no.

    Background Audio overview: http://msdn.microsoft.com/en-us/libr...v=vs.105).aspx

    All the values for the PlayState enum: http://msdn.microsoft.com/en-us/libr...v=vs.105).aspx

    Basically, the OS abstracts the action of 1) pulling out the headphones 2) incoming/outgoing call 3) and the user pausing the music with the OS controls to the 'pause' state.

Similar Threads

  1. Replies: 1
    Last Post: 2012-06-28, 03:29
  2. Headphone Insertion event in Symbian
    By boletushar in forum Symbian Media (Closed)
    Replies: 5
    Last Post: 2010-05-27, 08:44
  3. How to capture mobile ringing event or call connected event
    By nitin.84india in forum Mobile Java General
    Replies: 4
    Last Post: 2009-09-03, 06:19
  4. Event Notification
    By alancupid in forum Symbian
    Replies: 12
    Last Post: 2008-07-09, 11:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •