title: Efficiently Passing Custom Object Data between Android Activities [Mono Android]
body: <p>I've been stumped with this for a while now.
  I'm working on an android app that stores a person's fish catches, favorite fishing locations, tackle box inventory and other data. All my classes are Serializable and can saved and loaded between activities which seems to work thus far. But I'm predicting as more and more data is stored, the app will start running slow.</p>
  
  <p>What I'm basically asking is there any way to retain this data throughout the entire application, so I don't have to load it every time a new screen pops up. I've already found the following information to help but it needs to be a little more clear for me to understand:</p>
  
  <p>Another forum said you could stuff it in the Application object:</p>
  
  <pre><code>[Application]
  public class MyApp : Android.App.Application {
      public MyApp(IntPtr handle)
          : base (handle)
      {
      }
  
      public FishingData Data {get; set;}
  }
  </code></pre>
  
  <p>Then within your Activity:</p>
  
  <pre><code>((MyApp) this.ApplicationContext).Data = value;
  </code></pre>
  
  <p>So I've never really heard of doing this approach before and I'm not sure this will live through the entire application process (I feel like either way it's going to have to load the data via serialization. Here's what I want the app todo:</p>
  
  <p>The first activity is the main menu and the following must be done when the screen loads:</p>
  
  <ol>
  <li>If a settings file is found, use serialization to load a previous FishingData object (I know how to do this)</li>
  <li>If not, then create a new clean FishingData object to save later (I know this as well)</li>
  <li>So now that we have a FishingData object, how do I ensure that I don't have to repeat steps 1-2 in every activity. How can I somehow pass the FishingData object to the next activity and ensure that it lives globaly while the app is still living. <strong>I only want to load it once (via serializing)</strong> (&lt;--Don't know how to do this) and save it only when a user adds data to this object (which I know how to do).</li>
  </ol>
  
  <p>Any help will be appreciated. This is bugging me I cant seem to figure this out. This seems like it would be a common thing to do but I haven't had any luck finding any detailed information.</p>