title: how to run services using broadcast receiver
body: <p>how to start background services using broadcast receiver. made one services for camera lock operation but after some time function is not working . service is running in android devices. but method of services in onstartcommand not working. </p>
  
  <blockquote>
    <p>used action.user_present but its not working .</p>
  </blockquote>
  
  <pre><code> public class camerareceiver extends BroadcastReceiver{ 
  public static String TESTACT_S = "android.intent.action.USER_PRESENT"; 
       @Override
       public void onReceive(Context context, Intent intent) {
       if(intent.getAction().equals(TESTACT_S))
        { context.startService(newIntent("com.simsys.camera.ServiceTemplate")); } }
  </code></pre>