You need to use SharedPreferences.
//Set the shared preferences
SharedPreferences prefs = getSharedPreferences("myPrefs", 0);
SharedPreferences.Editor editor = prefs.edit();
editor.putString("myString", "myValue");
//Get the shared preferences
string myString = prefs.getString("myString");
Regarding the second part of your question, you would likely need to run a background service that the broadcast receiver and the activity can use.
The activity shouldn't be controlled from the widget and instead the activity GUI and the Widget control accesses methods within the background service to control the media player service.
I don't know too much about media player services or background tasks so maybe someone has a better method but hopefully will get you started.
Some information about services on android can be found at http://developer.android.com/reference/android/app/Service.html