0

리모컨을 사용하여 재생/일시 중지/ff/되감기 등의 특정 미디어 플레이어에게 주문한 브로드 캐스트를 보내고 있습니다.주문한 브로드 캐스트를 기본 Android/HTC 뮤직 플레이어로 보내지 않습니다.

private void sendbroadcast(int keyEvent) { 
     Intent i = new Intent(Intent.ACTION_MEDIA_BUTTON);  
     String selectedMediaPlayer = Common.get(context, SONR.APP_PACKAGE_NAME, "MEDIAPLAYERNOTFOUND"); 
     Log.d("BROADCAST PLAYER", selectedMediaPlayer); 
     i.setPackage(selectedMediaPlayer); 

     synchronized (this) { 
     i.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, keyEvent)); 
     context.sendOrderedBroadcast(i, null); 

     i.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_UP, keyEvent)); 
     context.sendOrderedBroadcast(i, null); 
     } 
    } 

대부분의 미디어 플레이어에서 작동합니다. 하지만 어떤 이유로 주문한 방송을 com.android.music에게 보내면 아무 일도 일어나지 않습니다.

어떻게 해결할 수 있을지 궁금하십니까?

답변

0

android.org에서 음악 플레이어를 살펴보면 순서가 지정된 방송을 중단해야합니까? 이제 알았어.

관련 문제