Getting CoverImage of local mp3 with metadata component

(Amirh Mrt) #1

Hi . iam working on project
i use metadata component in kodular its awesome , but i need get album art for it . to get image of mp3 files .

tnx

#2

Why don’t you use the “Album” block?

(Amirh Mrt) #3

i want image of mp3 files , how can i get it with “album block” ?

#4

Why dont you try it with the block?

(Amirh Mrt) #5

Can u explain more wich block do u mean?
I dont find any block about it​:thinking:
Tnx

(Amirh Mrt) #6

i want Cover image of MP3
Plz tell me wich block can help me?

#7

The “Album” block

(Daniel Vanko) #8

@amirh_mrt Mika means this block:
image

2 Likes
(Amirh Mrt) #9

i use this block , but i want cover IMAGE of files
and also I want get LYRICS . tnx

d2 d3

@Mika
@Daaniiieel

(J.K Videos) #10

By using the metadata extension i got the album art or cover image of the song but those songs which don’t have cover image leads App to crash,so is their any way to use default image of app if there is no cover image of song.

1 Like
(Amirh Mrt) #11

I tested this extention ,cause always app crash !

1 Like
(Daniel Vanko) #12

Yeah, because your mp3s do not have an album image, as @j_k_1612anand said,

1 Like
(J.K Videos) #13

I am also facing the same problem that’s why i am asking is there any way to use default image of app if there is no album image of song so app may not crash and work fine?

1 Like
(Amirh Mrt) #14

any news ? @Mika

#15

Why dont you use the block “Custom Item” if any block you need is not available?

With that you can get the value from all other meta tags which are not integrated as blocks.
Open this page:
https://developer.android.com/reference/android/media/MediaMetadataRetriever.html

Check then the item you want. After that use from the meta tag the given constant value.

Example:

METADATA_KEY_ALBUM

Constant Value: 1 (0x00000001)

The constant value number 1 is in your case the album meta tag.

Now use the value 1 together with the “Custom Item” block.

(Amirh Mrt) #16

ok bro let me test

(Amirh Mrt) #17

the soloution u said is about get TITLE of album
i want get Cover image of mp3

in that page say this :

getEmbeddedPicture

Added in API level 10

public byte getEmbeddedPicture ()

Call this method after setDataSource(). This method finds the optional graphic or album/cover art associated associated with the data source. If there are more than one pictures, (any) one of them is returned.

@Mika

#18

Then you have to wait until we provide the function as block you need.

(Amirh Mrt) #19

tnx
im waiting for u

(J.K Videos) #20

Many of the people’s are waiting for that block sir. Please also provide that function through which we can use default image of App if there is no album image of song is present Because that was the real problem which i was facing.
The metatag extension was not working properly on that situation only.

1 Like