Code for passing float value from service to activity:
call.putExtra("floatvalue", fv);
call.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(call);
Code for getting float value in the activity:
Bundle extras=new Bundle();
float value = extras.getFloat("floatvalue");
The problem is no matter what is passed as the float value from the service, I get only 0.0 in the activity.
What is the problem with the code?
EDIT
I changed the code in the activity to
Bundle extras=new Bundle();
extras=getIntent().getExtras();
float value = extras.getFloat("floatvalue");
It didnt work.
Try this:
Since you added the float to your intent before starting it, you should get the float from that intent not from the bundle.