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
          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" />
Link to comment
Share on other sites

Link to comment
Share on other sites

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

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


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





Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...