title: startservice not working in Android
body: <p>I am new in Android. Now i am doing one project using Service class.In my application contains one <strong>ListView</strong> .When we click on the item in the list view one Service class will be start. </p>
  
  <p>But some problems occurring in that place.At the time of first app open the Service class will be work. But if we go back and again press on the ListView the Service class not working. ie, it is not calling that time.Why this problem occurring. Please  help me. Code is given below.</p>
  
  <pre><code>    lv.setOnItemClickListener(new OnItemClickListener() {
  
      @Override
      public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2,
              long arg3) {
          // TODO Auto-generated method stub
          String item=pat_id[arg2];
          CommonClass.item=item;
          System.out.println("item 1" +CommonClass.item);
          startService(new Intent(getApplicationContext(),LocationService.class));
  
          //new Async_view_report().execute(rep_url,item,CommonClass.doctor_id);
      }
  
  
  });
  }
  </code></pre>