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


Java AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL属性代码示例

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


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

示例1: openEqualizer

public static void openEqualizer(@NonNull final Activity activity) {
    final int sessionId = MusicPlayerRemote.getAudioSessionId();
    if (sessionId == AudioEffect.ERROR_BAD_VALUE) {
        Toast.makeText(activity, activity.getResources().getString(R.string.no_audio_ID), Toast.LENGTH_LONG).show();
    } else {
        try {
            final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
            effects.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, sessionId);
            effects.putExtra(AudioEffect.EXTRA_CONTENT_TYPE, AudioEffect.CONTENT_TYPE_MUSIC);
            activity.startActivityForResult(effects, 0);
        } catch (@NonNull final ActivityNotFoundException notFound) {
            Toast.makeText(activity, activity.getResources().getString(R.string.no_equalizer), Toast.LENGTH_SHORT).show();
        }
    }
}
 
开发者ID:kabouzeid,项目名称:Phonograph,代码行数:15,代码来源:NavigationUtil.java

示例2: startEffectsPanel

private void startEffectsPanel() {
    try {
        final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
        effects.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, getContext().getPackageName());
        effects.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, MusicUtils.getAudioSessionId());
        effects.putExtra(AudioEffect.EXTRA_CONTENT_TYPE, AudioEffect.CONTENT_TYPE_MUSIC);
        startActivityForResult(effects, REQUEST_EQ);
    } catch (final ActivityNotFoundException ignored) {
        Toast.makeText(getActivity(), "No system equalizer found", Toast.LENGTH_SHORT).show();
    }
}
 
开发者ID:PhoenixDevTeam,项目名称:Phoenix-for-VK,代码行数:11,代码来源:AudioPlayerFragment.java

示例3: onOptionsItemSelected

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();
    switch (id) {
        case android.R.id.home:
            FragmentManager fm = getSupportFragmentManager();
            if (fm.getBackStackEntryCount() > 0) {
                fm.popBackStack();
            } else {
                fragmentLoader(setContainerId(), setFragment());
            }
            return true;
        case R.id.system_eq:
            Intent intent = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
            if (intent.getAction() != null && Helper.isActivityPresent(MainActivity.this, intent)){
                intent.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, musicXService.audioSession());
                startActivityForResult(intent, EQ);
            }else {
                Toast.makeText(this, "No app found to handle equalizer", Toast.LENGTH_SHORT).show();
            }
            break;
        case R.id.play_save_queue:
            multiQueuePlay();
            break;

    }
    return super.onOptionsItemSelected(item);
}
 
开发者ID:RajneeshSingh007,项目名称:MusicX-music-player,代码行数:28,代码来源:MainActivity.java

示例4: onCreateOptionsMenu

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    super.onCreateOptionsMenu(menu);

    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.starred, menu);

    MenuInflater inflater2 = getMenuInflater();
    inflater2.inflate(R.menu.share, menu);

    Intent i = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
    if (getPackageManager().resolveActivity(i, 0) != null) {
        MenuInflater inflater1 = getMenuInflater();
        inflater1.inflate(R.menu.equalizer, menu);
    }

    MenuInflater inflater3 = getMenuInflater();
    inflater3.inflate(R.menu.settings, menu);
    if (!MusicUtils.getBooleanPref(this, "radiomode", false)) {
        SubMenu menu1 = menu.addSubMenu(0, ADD_TO_PLAYLIST, 0,
                R.string.add_to_playlist);
        if (!MusicUtils.getBooleanPref(this, "radiomode", false)) {
            MusicUtils.makePlaylistMenuOnline(this, menu1);
        }
        menu.add(1, SEARCH_LYRICS, 0, R.string.search_lyrics_menu_short);
    }
    menu.add(1, ABOUT + 2, 0, R.string.carmode_menu_short);

    if (mSettings.getBoolean(PreferencesActivity.POPUP_ON, false))
        menu.add(1, ABOUT + 1, 0, R.string.go_popup);
    menu.add(1, ABOUT, 0, R.string.about_menu_short);
    menu.add(1, EXIT, 0, R.string.exit_menu);

    return true;
}
 
开发者ID:89luca89,项目名称:ThunderMusic,代码行数:35,代码来源:MediaPlaybackActivity.java

示例5: onOptionsItemSelected

/**
 * Respond to clicks on actionbar options
 */
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
     case R.id.action_search:
         onSearchRequested();
         break;

     case R.id.action_settings:
     	startActivityForResult(new Intent(this, SettingsHolder.class),0);
         break;

     case R.id.action_eqalizer:
 	    final Intent intent = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
         if (getPackageManager().resolveActivity(intent, 0) == null) {
      	startActivity(new Intent(this, SimpleEq.class));
     	}
     	else{
     		intent.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, MusicUtils.getCurrentAudioId());
     		startActivity(intent);
     	}
         break;

     case R.id.action_shuffle_all:
     	shuffleAll();
         break;

        default:
            return super.onOptionsItemSelected(item);
    }
    return true;
}
 
开发者ID:hubcarl,项目名称:mobile-manager-tool,代码行数:34,代码来源:MusicLibrary.java

示例6: getSystemEqIntent

public static Intent getSystemEqIntent(Context c) {
    Intent systemEq = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
    systemEq.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, c.getPackageName());

    ActivityInfo info = systemEq.resolveActivityInfo(c.getPackageManager(), 0);
    if (info != null && !info.name.startsWith("com.android.musicfx")) {
        return systemEq;
    } else {
        return null;
    }
}
 
开发者ID:marverenic,项目名称:Jockey,代码行数:11,代码来源:Util.java

示例7: onOptionsItemSelected

/**
 * Respond to clicks on actionbar options
 */
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
     case R.id.action_search:
         onSearchRequested();
         break;

     case R.id.action_settings:
     	startActivityForResult(new Intent(this, SettingsHolder.class),0);
         break;

     case R.id.action_eqalizer:
     	Intent i = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
            i.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, MusicUtils.getCurrentAudioId());
            startActivityForResult(i, 0);
         break;

     case R.id.action_shuffle_all:
     	shuffleAll();
         break;

        default:
            return super.onOptionsItemSelected(item);
    }
    return true;
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:29,代码来源:MusicLibrary.java

示例8: onPreferenceClick

@Override
public boolean onPreferenceClick(Preference preference) {
    if (preference == mEqualizer) {
        try {
            final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
            effects.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, getActivity().getPackageName());
            effects.putExtra(AudioEffect.EXTRA_CONTENT_TYPE, AudioEffect.CONTENT_TYPE_MUSIC);
            mActivytResultsController.startActivityForResult(effects, 0, null);
        } catch (final ActivityNotFoundException notFound) {
            Toast.makeText(getActivity(), getString(R.string.no_effects_for_you), Toast.LENGTH_LONG).show();
        }
        return true;
    }
    return false;
}
 
开发者ID:OpenSilk,项目名称:Orpheus,代码行数:15,代码来源:SettingsAudioFragment.java

示例9: resolveEqualizer

private void resolveEqualizer() {
    final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
    PackageManager pm = getActivity().getPackageManager();
    ResolveInfo ri = pm.resolveActivity(effects, 0);
    if (ri == null) {
        mEqualizer.setEnabled(false);
        mEqualizer.setSummary(R.string.settings_equalizer_none);
    }
}
 
开发者ID:OpenSilk,项目名称:Orpheus,代码行数:9,代码来源:SettingsAudioFragment.java

示例10: openEffectsPanel

/**
 * Opens the sound effects panel or DSP manager in CM
 * 
 * @param context The {@link SherlockFragmentActivity} to use.
 */
public static void openEffectsPanel(final SherlockFragmentActivity context) {
    try {
        final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
        effects.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, MusicUtils.getCurrentAudioId());
        context.startActivityForResult(effects, 0);
        // Make sure the notification starts
        MusicUtils.startBackgroundService(context);
    } catch (final ActivityNotFoundException e) {
        Crouton.makeText(context, context.getString(R.string.no_effects_for_you),
                Crouton.STYLE_ALERT);
    }
}
 
开发者ID:micromacer,项目名称:Player-by-TweekProject,代码行数:17,代码来源:NavUtils.java

示例11: onPrepareOptionsMenu

/**
 * {@inheritDoc}
 */
@Override
public boolean onPrepareOptionsMenu(final Menu menu) {
    mResources.setFavoriteIcon(menu);
    // Hide the EQ option if it can't be opened
    final MenuItem effects = menu.findItem(R.id.menu_audio_player_equalizer);
    final Intent intent = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
    if (getPackageManager().resolveActivity(intent, 0) == null) {
        effects.setVisible(false);
    }
    return true;
}
 
开发者ID:micromacer,项目名称:Player-by-TweekProject,代码行数:14,代码来源:AudioPlayerActivity.java

示例12: onCreateOptionsMenu

@Override
public boolean onCreateOptionsMenu(Menu menu) {
	super.onCreateOptionsMenu(menu);
	// Don't show the menu items if we got launched by path/filedescriptor, or
	// if we're in one shot mode. In most cases, these menu items are not
	// useful in those modes, so for consistency we never show them in these
	// modes, instead of tailoring them to the specific file being played.
	if (MusicUtils.getCurrentAudioId() >= 0) {
		menu.add(0, GOTO_START, 0, R.string.goto_start).setIcon(R.drawable.ic_menu_music_library);
		menu.add(0, PARTY_SHUFFLE, 0, R.string.party_shuffle); // icon will be set in onPrepareOptionsMenu()
		SubMenu sub = menu.addSubMenu(0, ADD_TO_PLAYLIST, 0,
				R.string.add_to_playlist).setIcon(android.R.drawable.ic_menu_add);
		// these next two are in a separate group, so they can be shown/hidden as needed
		// based on the keyguard state
		menu.add(1, USE_AS_RINGTONE, 0, R.string.ringtone_menu_short)
		.setIcon(R.drawable.ic_menu_set_as_ringtone);
		menu.add(1, DELETE_ITEM, 0, R.string.delete_item)
		.setIcon(R.drawable.ic_menu_delete);

		Intent i = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
		if (getPackageManager().resolveActivity(i, 0) != null) {
			menu.add(0, EFFECTS_PANEL, 0, R.string.effectspanel).setIcon(R.drawable.ic_menu_eq);
		}

		return true;
	}
	return false;
}
 
开发者ID:AndroidLearnerchn,项目名称:Android-Application-Using-CAF-Library,代码行数:28,代码来源:MediaPlaybackActivity.java

示例13: onOptionsItemSelected

/**
 * Respond to clicks on actionbar options
 */
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
     case R.id.action_search:
         onSearchRequested();
         break;

     case R.id.action_settings:
     	startActivityForResult(new Intent(this, SettingsHolder.class),0);
         break;

     case R.id.action_eqalizer:
 	    final Intent intent = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
         if (getPackageManager().resolveActivity(intent, 0) == null) {
      	startActivity(new Intent(this, SimpleEq.class));
     	}
     	else{
     		intent.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, MusicUtils.getCurrentAudioId());
     		startActivity(intent);
     	}
         break;

     case R.id.action_shuffle_all:
     	shuffleAll();
         break;
         
     case R.id.exit_app:
     	System.exit(1);
         break;    

        default:
            return super.onOptionsItemSelected(item);
    }
    return true;
}
 
开发者ID:C-Aniruddh,项目名称:xPlodMusic,代码行数:38,代码来源:MusicLibrary.java

示例14: createDisplayIntent

private static Intent createDisplayIntent() {
	final Intent intent = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
	intent.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, BuildConfig.APPLICATION_ID);
	intent.putExtra(AudioEffect.EXTRA_CONTENT_TYPE, AudioEffect.CONTENT_TYPE_MUSIC);
	intent.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, Player.audioSessionId);
	return intent;
}
 
开发者ID:carlosrafaelgn,项目名称:FPlayAndroid,代码行数:7,代码来源:ExternalFx.java

示例15: isEqualizerAvailable

private boolean isEqualizerAvailable() {
    Intent intent = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
    PackageManager manager = getActivity().getPackageManager();
    List<ResolveInfo> infos = manager.queryIntentActivities(intent, 0);
    return infos.size() > 0;
}
 
开发者ID:PhoenixDevTeam,项目名称:Phoenix-for-VK,代码行数:6,代码来源:AudioPlayerFragment.java


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