Use intents
Intent i = new Intent(MainActivity.this, Power.class)
i.putExtra("key",money);
startActivity(i);
To retrieve
Bundle extras = getIntent().getExtras();
if(extras!=null)
{
double value = extras.getDoubleExtra ("key",defaultvalue);
}
http://developer.android.com/reference/android/content/Intent.html
putExtra
public Intent putExtra (String name, double value)
Added in API level 1
Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll".
Parameters
name The name of the extra data, with package prefix.
value The double data value.
Returns
Returns the same Intent object, for chaining multiple calls into a single statement.
getDoubleExtra
public double getDoubleExtra (String name, double defaultValue)
Added in API level 1
Retrieve extended data from the intent.
Parameters
name The name of the desired item.
defaultValue the value to be returned if no value of the desired type is stored with the given name.
Returns
the value of an item that previously added with putExtra() or the default value if none was found.