Working with Bundles in Android
<p>I have an app containing many functions, of course. On of my functions is returning two variables, one <code>int</code> and one <code>String</code>. I've figured out that the easiest way to return this variables is to put them in a <code>Bundle</code>, e.g like this:</p>

<pre><code>private Bundle returnInfo() {

   Bundle result = new Bundle(); 
   String something = "This is a test";
   int number = 15; 

   result.putInt("number", number); 
   result.putString("string", something); 
   return result; 
}
</code></pre>

<p>And in another function like this:</p>

<pre><code>private void getInfo() {

   Bundle gotcha = returnInfo(); 
   String gotSomething = gotcha.getString("string"); 
   int gotNumber = gotcha.getInt("number"); 

}
</code></pre>

<p>This is just a part of my app, in fact this is just a mockup to show you my problem. Cause when I debug my app, the variables <code>gotSomething</code> and <code>gotNumber</code> contains <code>null</code>, but my Bundle <code>gotcha</code> contains <code>Bundle[{string=This is a test, number=15 }]</code>  isn't this the way to solve my problem? </p>
