title: Why doesn't my Service work in Android? (I just want to log something ever 5 seconds)
body: <p>I created a new class called HelloService.
  I added this to the Android manifest.xml.</p>
  
  <pre><code>public class HelloService extends Service {
      private Timer timer = new Timer();
      private long INTERVAL = 5000;
  
      public void onCreate() {
          super.onCreate();
          startservice();
  
      }
  
      private void startservice() {
          timer.scheduleAtFixedRate( new TimerTask() {
              public void run() {
                  Log.d("servy", "This proves that my service works.");
              }
          }, 0, INTERVAL);
      ; }
  
      private void stopservice() {
          if (timer != null){
              timer.cancel();
          }
      }
  
      @Override
      public IBinder onBind(Intent arg0) {
          return null;
      }
  }
  </code></pre>
  
  <p>My other activity calls it like this:</p>
  
  <pre><code>    Intent helloservice = new Intent(this, HelloService.class);
      startService(helloservice);
  </code></pre>
  
  <p>For some reason, I put a breakpoint in my new HelloService...but it's not even hitting.  It's not logging either.</p>
  
  <p><strong>Edit:
  "Unable to start service Intent { cmp = com.examples.hello/.HelloService }: not found"</strong> </p>
  
  <p>What does that mean? ... I created HelloService.java in the same place as everything else...</p>
  
  <hr>
  
  <p>Solved. I fixed my manifest file.
  Thanks Nikola Smiljanic</p>
  
  <pre><code>&lt;service android:name=".HelloService"/&gt;
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>   &lt;service android:name="HelloService"&gt;&lt;/service&gt;
  </code></pre>