title: Android Lock Screen and Keyboard Controls
body: <p>I am part way through writing a media player app for Android.  It's all going really well so far, however I am now reaching the difficult stage!</p>
  
  <p>I have two questions.  Do i need to implement a service activity?  As I understand it, this is required to allow the app to continue working in the background.  However, mine is working fine while I move to other programs on the tablet, and returns to the app without problems.  Can someone please explain what the advantages are of services?</p>
  
  <p>Secondly, I would like to integrate the media player with the standard lock screen controls in ICS, and also make it take advantage of tablets (such as the asus transformer) that have keyboard play/pause skip controls.  I would appreciate it if someone could point me in the right direction to get me started.  From my googling it would seem that BroadcastReciever is needed, or perhaps RemoteControlClient, but I've no idea where to start!  </p>
  
  <p>I have a main activity with actionbar tabs, which contain a music player fragment and soon a video player fragment.</p>
  
  <p>Do i need to create a layout specifically for the lock screen, or can i make use of standard API's?</p>
  
  <p>Any help gratefully received!</p>