title: Start Service within other service not start
body: <p>I want to start one service from other service not in an activity, I did following code, but not work it execute block but service not started.</p>
  
  <p><strong>Myservice.class</strong></p>
  
  <pre><code>HttpPost post = new HttpPost(Constant1.URL_GET_COURSE_LIST);
  String result = HTTPadapter.getDetails(post);
  Log.e("resultofcourselist", "" + result);
  Intent i=new Intent(getApplicationContext(),DemoService.class);
  i.putExtra("result", result);
  startService(i);
  </code></pre>
  
  <p><strong>Demoservice.class</strong></p>
  
  <pre><code>intent.getStringExtra("result");
  
  try {
      jsonResponse = new JSONArray(result);
      jsonObject = jsonResponse.getJSONObject(0);
      jsonMainNode = jsonObject.optJSONArray("rowsResponse");
  
      //DbAdd dbAdd=new DbAdd();
      for (int i = 0; i &lt; jsonMainNode.length(); i++) {
          JSONObject jsonChildNode = jsonMainNode.getJSONObject(i);
          result = jsonChildNode.optString("result").toString();
  
          if (result.equals("Success")) {
              jsonObject = jsonResponse.getJSONObject(1);
              jsonMainNode = jsonObject.optJSONArray("getCourseList");
              // dbAdd.setJsonMainNode(jsonMainNode);
              for (int j = 0; j &lt; jsonMainNode.length(); j++) {
                  // dbAdd.setJsonChildNode();
                  JSONObject childnode = jsonMainNode.getJSONObject(j);
                  Intent dbadd = new Intent(getApplicationContext(), Dbadd.class);
                  dbadd.putExtra("mainnode", jsonMainNode.toString());
                  dbadd.putExtra("childnode", childnode.toString());
                  // dbadd.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                  startService(dbadd);
              }
              stopSelf();
          } else {
              //
          }
      }
  } catch (Exception e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>Manifest.xml</p>
  
  <pre><code>&lt;service android:name=".Myservice" /&gt;
  &lt;service android:name=".DemoService" /&gt;
  </code></pre>
  
  <p><strong>Log</strong></p>
  
  <pre><code>Myservice start print in log but in demoservice on startcommand not execute
  </code></pre>