incorrect Context when writing a simple serializable object
I've got a simple android app with a button, a listview w/ arrayadapter & a custom object. When I push the button to save the object I get an error like this:

W/System.err(367): java.io.NotSerializableException: android.widget.ArrayAdapter

I stripped everything down to the declares and assignments and the test code below but still get the 
error. It seems the context is getting confused with the ArrayAdapter though I can't see how.

I've read every serializable & notserializableexception article on Stack Overflow & a big chunk of stuff through google but no one else has had this problem apparently.

Any ideas?


	public class Tester implements Serializable{
		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;
	public String frog;
		public Tester(){
			frog="frog";
		}
		
	}
	 public void Testit(){
		 final Tester test = new Tester();
   	   FileOutputStream fos;
          try {
              fos = openFileOutput("worklist.fil", Context.MODE_WORLD_READABLE);
              Log.d("file open","...");
              ObjectOutputStream oos = new ObjectOutputStream(fos);
              Log.d("ObjOutStr","...");
              oos.writeObject(test); 
              Log.d("tried wO","...");  //never gets here
              oos.close();
          } catch (FileNotFoundException e) {
              e.printStackTrace();
              Log.d ("filenotfound", "...");
          }catch(IOException e){
              e.printStackTrace();// throws this
              Log.d("ioexception", "...");
          }

	}


incorrect Context when writing a simple serializable object
===

I've got a simple android app with a button, a listview w/ arrayadapter & a custom object. When I push the button to save the object I get an error like this:

W/System.err(367): java.io.NotSerializableException: android.widget.ArrayAdapter

I stripped everything down to the declares and assignments and the test code below but still get the 
error. It seems the context is getting confused with the ArrayAdapter though I can't see how.

I've read every serializable & notserializableexception article on Stack Overflow & a big chunk of stuff through google but no one else has had this problem apparently.

Any ideas?


	public class Tester implements Serializable{
		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;
	public String frog;
		public Tester(){
			frog="frog";
		}
		
	}
	 public void Testit(){
		 final Tester test = new Tester();
   	   FileOutputStream fos;
          try {
              fos = openFileOutput("worklist.fil", Context.MODE_WORLD_READABLE);
              Log.d("file open","...");
              ObjectOutputStream oos = new ObjectOutputStream(fos);
              Log.d("ObjOutStr","...");
              oos.writeObject(test); 
              Log.d("tried wO","...");  //never gets here
              oos.close();
          } catch (FileNotFoundException e) {
              e.printStackTrace();
              Log.d ("filenotfound", "...");
          }catch(IOException e){
              e.printStackTrace();// throws this
              Log.d("ioexception", "...");
          }

	}

