Jump to content

Вывод музыки на локскрин miui14


Recommended Posts

Здравствуйте!
Хочу вывести на локскрин обложку альбома, но miui не работает так просто с Poweramp'ом
Придется выводить с помощью Intent'ов, нашел на форуме это вот:

A specifc intent, which contains the information of current song and state of player, will be broadcasted when the state of MIUI music player changed or a specific song-metadata-request intent received.  And song info on MIUI lockscreen will be changed automatically when MIUI lockscreen have listened the specific intent. Below shows the intent which broadcasted by MIUI player.

 

Intent: lockscreen.action.SONG_METADATA_UPDATED
Extras:
          tmp_album_path: paramString
          is_showmusic:  paramBoolean
          artist:  str1
          album:  str2
          track: str3
          playing: bool
 

 

A "lockscreen.action.SONG_METADATA_REQUEST" intent will be broadcasted by MIUI lockscreen when you tap the control(e.g. tap the time on MIUI lockscreen) on MIUI lockscreen. This intent can trigger MIUI music player to broadcast its information to MIUI lockscreen for display.

 

Intent: lockscreen.action.SONG_METADATA_REQUEST

только вот как заставить это работать, так и не понял
ниже привожу часть maml кода, отвечающую за открытие приложения, по уведомлению от которого тапнул юзер (для примера)
если кто-то понимает как сделать вывод обложки, помогите, пожалуйста!

<IntentCommand action="com.miui.app.ExtraStatusBarManager.action_remove_keyguard_notification" broadcast="true" >
   <Extra name="com.miui.app.ExtraStatusBarManager.extra_notification_key" type="int" expression="@notice_key[#noticeDown]" />
   <Extra name="com.miui.app.ExtraStatusBarManager.extra_notification_click" type="int" expression="0" />
</IntentCommand>
Link to comment
Share on other sites

On 5/5/2023 at 2:23 PM, maxmp said:

Miui (13-14) выводит обложку с Poweramp без проблем (настройки по умолчанию).

Screenshot_20230505_152337.png

в статус бар - да, на локскрин при использовании темы - нет.. (стандартный плеер miui справляется)

5393397000495549288_121.jpg

5393397000495549289_121.jpg

5393397000495549290_121.jpg

5393397000495549291_121.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...