Doubt in implementing Service
<p>I have written a service To delete data from a table when data inputed into it(tblTest) as given below</p>

<pre><code>public class service_helper extends Service {
    private DatabaseAdapter dbAdapter;
     @Override
     public IBinder onBind(Intent arg0) {

           return null;

     }

     @Override

     public void onCreate() {

           super.onCreate();

           Toast.makeText(this,"Service created ...", Toast.LENGTH_LONG).show();
         dbAdapter = new DatabaseAdapter(this); 
         dbAdapter.open();


        String sqlTransaction = "Select test from tblTest where test &gt; ?";
        dbAdapter = new DatabaseAdapter(this); dbAdapter.open();
         Cursor cursorTransaction = dbAdapter.ExecuteRawQuery(sqlTransaction, "-1");

         for (int i = 0; i &lt; cursorTransaction.getCount(); i++) {

            String sql = "DELETE FROM tblTest WHERE test=" + i + " ";
            dbAdapter.ExecuteQuery(sql);    
         }



     }



     @Override

     public void onDestroy() {

           super.onDestroy();

           Toast.makeText(this, "Service destroyed ...", Toast.LENGTH_LONG).show();

     }

}
</code></pre>

<p>I have Started the service in the on create of main activity as  given below</p>

<p>startService(new Intent(this, service_helper.class));</p>

<p>The problem is that I can't do anything in my applicaion because of the service got stated.I cant navigate from my main form.Is it the Right way to implement Service ?</p>

<p>Will any one help me</p>
