Android RingtoneManager - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android RingtoneManager class.

This code example shows how to use the following methods: getCursor, inferStreamType, setIncludeDrm, setType
9
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getCursor, inferStreamType, setIncludeDrm, setType
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getSystemService, getRingtone
        } 
    } 
 
    private void initAudio() { 
        mAudioManager = (AudioManager) mContext
                .getSystemService(Context.AUDIO_SERVICE);
    } 
 
    private synchronized void ringIncoming() { 
        Uri uri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
        int ringerMode = mAudioManager.getRingerMode();
        mVibrator = (Vibrator) mContext
                .getSystemService(Context.VIBRATOR_SERVICE);
        if (mCallInProgress) {
            // Notify with single vibrate. 
            mVibrator.vibrate((long) 200);
        } else { 
            if (AudioManager.RINGER_MODE_NORMAL == ringerMode) {
                mAudioManager.setMode(AudioManager.MODE_RINGTONE);
                ring(uri, AudioManager.STREAM_RING);

7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getCursor, inferStreamType, setIncludeDrm, setType
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getCursor, setIncludeDrm, setType
  class BuiltinToneCursor extends ToneCursor 
  { 
    private RingtoneManager mRingtoneManager;
    public BuiltinToneCursor(int ringtone_type) { 
      init(); 
      mRingtoneManager = new RingtoneManager(mContext);
      mRingtoneManager.setType(ringtone_type);
      mRingtoneManager.setIncludeDrm(true);
      mCursor = mRingtoneManager.getCursor();
    } 
    public Tone cacheTone(int position) {
      mCursor.moveToPosition(position);
      Tone tone = new Tone();
      tone.name = mCursor.getString(RingtoneManager.TITLE_COLUMN_INDEX);
      tone.uri = mRingtoneManager.getRingtoneUri(position);
      return tone;
    } 
  } 
 
  class MediaToneCursor extends ToneCursor 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android RingtoneManager Questions & Answers:

See Code Examples for Android RingtoneManager Methods: