Code example for Intent

Methods: getBooleanExtragetIntExtragetParcelableExtra

0
    public _RingtonePickerDialog create() { 
        if (dialog != null) {
            return this;
        } 
        handler = new Handler();
        hasDefaultItem = intent.getBooleanExtra(
                RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
        uriForDefaultItem = intent
                .getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI);
        if (uriForDefaultItem == null) {
            uriForDefaultItem = Settings.System.DEFAULT_RINGTONE_URI;
        } 
        hasSilentItem = intent.getBooleanExtra(
                RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
        ringtoneManager = new RingtoneManager(context);
        final boolean includeDrm = intent.getBooleanExtra(
                RingtoneManager.EXTRA_RINGTONE_INCLUDE_DRM, true);
        ringtoneManager.setIncludeDrm(includeDrm);
        int types = intent.getIntExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, -1);
        if (types != -1) {
            ringtoneManager.setType(types);
        } 
        cursor = ringtoneManager.getCursor();
        if (context instanceof Activity) {
            ((Activity) context).setVolumeControlStream(ringtoneManager
                    .inferStreamType());
        } 
        existingUri = intent
                .getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI);
        builder = new AlertDialog.Builder(context);
        dialog = onCreateDialog(builder);
        return this;
    } 
 
Experience pair programming with AI  Get Codota for Java