Example usage for android.media RingtoneManager TYPE_ALL

List of usage examples for android.media RingtoneManager TYPE_ALL

Introduction

In this page you can find the example usage for android.media RingtoneManager TYPE_ALL.

Prototype

int TYPE_ALL

To view the source code for android.media RingtoneManager TYPE_ALL.

Click Source Link

Document

All types of sounds.

Usage

From source file:Main.java

/**
 * get ringtone list//from w ww. j av a 2 s .  c  o  m
 * @return
 */
public static Intent getRingtoneIntent() {
    Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
    intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_ALL);

    return intent;
}

From source file:com.microsoft.mimickeralarm.settings.RingtonePreference.java

private void onPrepareRingtonePickerIntent(Intent ringtonePickerIntent) {
    ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, getRingtone());
    ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
    ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI,
            GeneralUtilities.defaultRingtone());
    ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
    ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_ALL);
    ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, getTitle());
}

From source file:de.lespace.apprtc.ConnectActivity.java

@Override
public void onIncomingCall(final String from) {

    // Notify UI that registration has completed, so the progress indicator can be hidden.
    /*/*w  w w .  j  av  a 2 s.c  o  m*/
            //Send Broadcast message to Service
            Intent registrationComplete = new Intent(QuickstartPreferences.INCOMING_CALL);
            LocalBroadcastManager.getInstance(this).sendBroadcast(registrationComplete);
            
            startActivity(intent);*/

    /* Intent intent = new Intent(this, ConnectActivity.class);
     intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
     startActivity(intent);
     Intent intent = new Intent(this,CallActivity.class);
     intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);*/
    // r.stop();
    //startActivity(intent);

    roomConnectionParameters.to = from;
    roomConnectionParameters.initiator = false;
    DialogFragment newFragment = new RTCConnection.CallDialogFragment();

    Uri alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);

    if (alert == null) {
        // alert is null, using backup
        alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);

        // I can't see this ever being null (as always have a default notification)
        // but just incase
        if (alert == null) {
            // alert backup is null, using 2nd backup
            alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALL);
        }
    }
    r = RingtoneManager.getRingtone(getApplicationContext(), alert);
    //  r.play();

    FragmentTransaction transaction = getFragmentManager().beginTransaction();
    transaction.add(newFragment, "loading");
    transaction.commitAllowingStateLoss();

}