Passing a double value through to a different class in Android Java
You're not actually placing your doubles into your Intent
Intent yourInent = new Intent(thisActivity.this, nextActivity.class);
Bundle b = new Bundle();
b.putDouble("key", doubleVal);
yourIntent.putExtras(b);
startActivity(yourIntent);
Then, get it in your next Activity:
Bundle b = getIntent().getExtras();
double result = b.getDouble("key");
You can try by this way
double a, b;
Intent i = new Intent(classA.this, classB.class);
Bundle params = new Bundle();
params.putDouble("doubleA", a);
params.putDouble("doubleB", b);
i.putExtras(params);
startActivity(i);
At other side you need something like this
double a, b;
// Get Params from intent
Intent it = getIntent();
if (it != null)
{
Bundle params = it.getExtras();
if (params != null)
{
a = params.getDouble("doubleA");
b = params.getDouble("doubleB");
}
}