当前位置: 首页>>代码示例>>Java>>正文


Java RingtoneManager.ACTION_RINGTONE_PICKER属性代码示例

本文整理汇总了Java中android.media.RingtoneManager.ACTION_RINGTONE_PICKER属性的典型用法代码示例。如果您正苦于以下问题:Java RingtoneManager.ACTION_RINGTONE_PICKER属性的具体用法?Java RingtoneManager.ACTION_RINGTONE_PICKER怎么用?Java RingtoneManager.ACTION_RINGTONE_PICKER使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.media.RingtoneManager的用法示例。


在下文中一共展示了RingtoneManager.ACTION_RINGTONE_PICKER属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: launchNotificationSoundPicker

private void launchNotificationSoundPicker(int code, String currentPowerRingtonePath) {
    final Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);

    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE,
            getString(R.string.power_notifications_ringtone_title));
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE,
            RingtoneManager.TYPE_NOTIFICATION);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI,
            System.DEFAULT_NOTIFICATION_URI);
    if (currentPowerRingtonePath != null &&
            !currentPowerRingtonePath.equals(POWER_NOTIFICATIONS_SILENT_URI)) {
        Uri uri = Uri.parse(currentPowerRingtonePath);
        if (uri != null) {
            intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, uri);
        }
    }
    startActivityForResult(intent, code);
}
 
开发者ID:ric96,项目名称:lineagex86,代码行数:18,代码来源:OtherSoundSettings.java

示例2: pickNotificationRingtone

private void pickNotificationRingtone() {
    Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, Settings.System.DEFAULT_NOTIFICATION_URI);

    String existingValue = mPrefsModel.notificationSound();
    if (TextUtils.isEmpty(existingValue)) {
        // Select "Silent"
        intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, (Uri) null);
    } else {
        intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, Uri.parse(existingValue));
    }

    startActivityForResult(intent, REQUEST_CODE_RINGTONE);
}
 
开发者ID:mecid,项目名称:robird-reborn,代码行数:17,代码来源:SettingsFragment.java

示例3: onClick

@Override
public void onClick(View view) {
    if (isAdded()) {
        if (adapter.isRowChecked(view)) {
            // open ringtone picker dialog
            Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
            intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
            intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, getString(R.string.Ringtone_picker));
            intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, getRingtoneUri(requestCode));
            startActivityForResult(intent, requestCode);
        }
    } else {
        adapter.setRowChecked(view, false);
    }
}
 
开发者ID:kaliturin,项目名称:BlackList,代码行数:15,代码来源:SettingsFragment.java

示例4: onClick

@Override
public void onClick(View v) {
    RingtoneSetting entry = getEntry();
    Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, entry.mValue);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI,
            RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, entry.mName);
    intent.putExtra("android.intent.extra.ringtone.AUDIO_ATTRIBUTES_FLAGS", 0x1 << 6); // Perhaps a bit of a hack, but imo needed
    mAdapter.startActivityForResult(intent, entry.mRequestCode);
}
 
开发者ID:MCMrARM,项目名称:revolution-irc,代码行数:14,代码来源:RingtoneSetting.java

示例5: onPreferenceTreeClick

@Override
public boolean onPreferenceTreeClick(PreferenceScreen prefScreen, Preference pref) {
    if (pref == mNotifSoundPref) {
        Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
        intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, mSoundUri);
        intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
        intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
        intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
        intent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, 
                Settings.System.DEFAULT_NOTIFICATION_URI);
        startActivityForResult(intent, REQ_PICK_SOUND);
        return true;
    }
    return super.onPreferenceTreeClick(prefScreen, pref);
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:15,代码来源:LedSettingsFragment.java

示例6: onChooseSound

public void onChooseSound(View v) {
    Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, "Select Tone");
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, (Uri) null);
    this.startActivityForResult(intent, 5);
}
 
开发者ID:jpmeijers,项目名称:ttnmapper_android_v2,代码行数:7,代码来源:SettingsActivity.java

示例7: onClick

@SuppressWarnings("deprecation")
@Override
public void onClick(View v) {
	boolean status = false;
	switch(v.getId()){
	case R.id.antiTheftStatus:
		status = MyUtils.getToogleImageStatus(ivShowAntiTheftStatus)==true?false:true;
		setSP.setAntiTheftShowStatus(status);
		MyUtils.setToogleImageStatus(ivShowAntiTheftStatus, status);
		break;
	case R.id.ring:
		status = MyUtils.getToogleImageStatus(ivRing)==true?false:true;
		setSP.setAntiTheftRing(status);
		MyUtils.setToogleImageStatus(ivRing, status);
		break;
	case R.id.vibrate:
		status = MyUtils.getToogleImageStatus(ivVibrate)==true?false:true;
		setSP.setAntiTheftVibrate(status);
		MyUtils.setToogleImageStatus(ivVibrate, status);
		break;
	case R.id.delay:
		listType = 0;
		FavoriteCharacterDialogFragment.show(this, "报警延时", strDelayTimes);
		break;
	case R.id.ringtone:
		Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
		intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, "设置报警铃音");
		intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_RINGTONE);
		intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);
		startActivityForResult(intent, REQUEST_SELECT_ALARM_RINGTONE);
		break;
	case R.id.enhancedMode:
		status = MyUtils.getToogleImageStatus(ivEnhancedMode)==true?false:true;
		setSP.setAntiTheftOpenBTEnhancedMode(status);
		MyUtils.setToogleImageStatus(ivEnhancedMode, status);
		break;
	case R.id.bt:
		status = MyUtils.getToogleImageStatus(ivBTClosed)==true?false:true;
		setSP.setAntiTheftBTClosedAlarm(status);
		MyUtils.setToogleImageStatus(ivBTClosed, status);
		break;
	case R.id.sensivity:
		listType = 1;
		FavoriteCharacterDialogFragment.show(this, "静置报警灵敏度", strRestSensitivitys);
		break;
	}
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:47,代码来源:AntiTheftSetupAty.java

示例8: onClick

@Override
protected void onClick() {
    Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
    onPrepareRingtonePickerIntent(intent);
    mParent.startActivityForResult(intent, RINGTONE_PICKER_REQUEST);
}
 
开发者ID:davideas,项目名称:AndroidBlueprints,代码行数:6,代码来源:RingtonePreference.java


注:本文中的android.media.RingtoneManager.ACTION_RINGTONE_PICKER属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。