Android Service with IPC
<p>I have spent the last two days trying to figure this out.  I have a service that I am creating to practice with services and IPC.  I have checked the code against the book that I am reading it is almost exact only difference being identifiers.  I get a ResourcesNotFoundException thrown in the mainwindow.java file.  It is thrown when I try to use my IBinder.  Any tip in the right direction will be much appreciated.
mainwindow.java</p>

<p><pre> [code]
package com.evilOrion;
import com.evilOrion.R;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.DeadObjectException;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;</p>

<p>public class mainwindow extends Activity {
 TextView tView = null;
 Button tButton = null;
 private adder service;
 private boolean bound;</p>

<p>private ServiceConnection connection = new ServiceConnection(){
  public void onServiceConnected(ComponentName className, IBinder iservice){
   service = adder.Stub.asInterface(iservice);
   bound = true;
  }
  public void onServiceDisconnected(ComponentName className){
   bound = false;
   service = null;
  }
 };</p>

<pre><code>/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    tView = (TextView)findViewById(R.id.TextView);
    tView.setText("hi");

   tButton = (Button)findViewById(R.id.Button01);
    tButton.setOnClickListener(new OnClickListener(){
     public void onClick(View v){
     if(v.equals(tButton)){
     try{
      int result = service.add(5, 7);// crashes on this line with no exception
      tView.setText(result);
     }catch(DeadObjectException e){
     Log.i("DeadObjectException", "found the problem"); 
     }

     catch(RemoteException e){
      Log.i("Exception: " , "shoot!");
     }
      //tView.setText("What a wonderful day it is");
    }
     }
    });
}
public void onStart(){
 super.onStart();
 if(!bound){
  this.bindService(new Intent(mainwindow.this, AdderService.class), connection, Context.BIND_AUTO_CREATE);
 }
}
public void onPause(){
 super.onPause();
 if(bound){
  bound = false;
  this.unbindService(connection);
 }
}
</code></pre>

<p>}
[/code]<code>
AdderService.java
[code]
package com.evilOrion;</p>

<p>import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;</p>

<p>public class AdderService extends Service {</p>

<p>private final adder.Stub binder = new adder.Stub() {</p>

<p>@Override
  public int subtranct(int a, int B) throws RemoteException {
   // TODO Auto-generated method stub
   return  a - b;
  }</p>

<p>@Override
  public String echo(String input) throws RemoteException {
   // TODO Auto-generated method stub
   return "echo" + input;
  }</p>

<p>@Override
  public int add(int a, int B) throws RemoteException {
   // TODO Auto-generated method stub
   return  a + b;
  }
 };</p>

<p>public IBinder onBind(Intent it){
  return this.binder;
 }</p>

<p>}
[/code]
Manifest
[code]


    
        
            
                
                
            
        
        </p>

&lt;/application&gt;
</code></pre>

<p> 
[/code]
main.xml
[code]



android:id="@+id/TextView"
android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    />
    

<blockquote>
  <p>
  
  [/code]
  My Manifest file does have the  so I am sure it is not there.  I have gone literally line by line between my book and the code and I see 0 differences.  I just don't understand what I am doing wrong.  One other odd side question.  What creates the connection?  I get ServiceConnection holds the information on my connection with the two methods onServiceConnected and onServiceDisconnected, but the only place I use connection is in onStart(), does onStart() automatically get called after all other methods are complete.  Essentially, I am lost I usually avoid asking questions but I haven't been able to find this answer.  </p>
</blockquote>

<p>int result = service.add(5, 7); in the mainwindow.java file causes:
 No package identifier when getting value for resource number 0x0000000c
09-14 20:36:08.684: INFO/Exception!!!(12446): android.content.res.Resources$NotFoundException: String resource ID #0xc</p>

<p>is thrown in the mainwindow.java</p>
