Activity setVolumeControlStream - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Activity setVolumeControlStream method.

This code example shows how to use the following methods:getSystemService, setVolumeControlStream, getClass
	 
	public void disableKeyguard(Activity activity) {
		if (mKeyguardLock != null) {
			mKeyguardLock.disableKeyguard();
		} else { 
			KeyguardManager keyguardManager = (KeyguardManager) activity.getSystemService(Activity.KEYGUARD_SERVICE);
			mKeyguardLock = keyguardManager.newKeyguardLock(KEYGUARD_TAG);
			mKeyguardLock.disableKeyguard();
		} 
	} 
	 
	public void enableKeyguard() { 
		if (mKeyguardLock != null) {
			mKeyguardLock.reenableKeyguard();
		} 
		mKeyguardLock = null;
	} 
 
 
	public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {

7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:setVolumeControlStream
 
        @Override 
        public void setVolumeControlStream(int streamType) {
            Activity activity = mActivityReference.get();
            if (activity != null) {
                activity.setVolumeControlStream(streamType);
            } 
        } 
    } 
 
    /** 
     * Controls a TextView with dynamically changing text. 
     * <p> 
     * There are two methods here of interest, 
     * {@link TextViewWithMessagesController#setPermanentText(String)} and 
     * {@link TextViewWithMessagesController#setTemporaryText(String, long, TimeUnit)}.  The 
     * former is used to set the text on the text view immediately, and is used in our case for 
     * the countdown of duration remaining during voicemail playback.  The second is used to 
     * temporarily replace this countdown with a message, in our case faster voicemail speed or 
     * slower voicemail speed, before returning to the countdown display. 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java

Related Activity setVolumeControlStream Questions & Answers:

setVolumeControlStream Method Overview
Suggests an audio stream whose volume should be changed by the hardware volume controls.
See Code Examples for other Android Activity Methods: