RingtonePickerActivityLauncherpublic class RingtonePickerActivityLauncher extends android.app.Activity Activity that will launch the RingtonePickerActivity as a subactivity, and
waits for its result. |
Fields Summary |
---|
private static final String | TAG | public boolean | resultReceived | public int | resultCode | public android.content.Intent | result | public android.net.Uri | pickedUri |
Methods Summary |
---|
public void | launchRingtonePickerActivity(boolean showDefault, android.net.Uri existingUri, int types)Launches the {@link RingtonePickerActivity} and blocks until it returns.
Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, showDefault);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, existingUri);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, types);
startActivityForResult(intent, 0);
| protected void | onActivityResult(int requestCode, int resultCode, android.content.Intent data)
super.onActivityResult(requestCode, resultCode, data);
resultReceived = true;
this.resultCode = resultCode;
this.result = data;
if (data != null) {
this.pickedUri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
}
| protected void | onCreate(android.os.Bundle savedInstanceState)
super.onCreate(savedInstanceState);
setContentView(android.R.layout.simple_list_item_1);
|
|