FileDocCategorySizeDatePackage
RingtonePickerActivityLauncher.javaAPI DocAndroid 1.5 API2680Wed May 06 22:42:02 BST 2009com.android.frameworktest.settings

RingtonePickerActivityLauncher

public 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
Constructors Summary
Methods Summary
public voidlaunchRingtonePickerActivity(boolean showDefault, android.net.Uri existingUri, int types)
Launches the {@link RingtonePickerActivity} and blocks until it returns.

param
showDefault {@link RingtonePickerActivity#EXTRA_SHOW_DEFAULT}
param
existingUri {@link RingtonePickerActivity#EXTRA_EXISTING_URI}
param
filterColumns {@link RingtonePickerActivity#EXTRA_RINGTONE_COLUMNS}

        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 voidonActivityResult(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 voidonCreate(android.os.Bundle savedInstanceState)

    
    
        
        super.onCreate(savedInstanceState);
        
        setContentView(android.R.layout.simple_list_item_1);