语言

Menu
Sites
Language
tizen.content.find on Emulator

I am trying to play around with the Wearable 3.0 sample application '(Circle) Music Player' on the emulator. But it doesn't find any audio files. It doesn't find any files at all. On a physical device it works. What am I doing wrong?

Simplified the code now is like this:

tizen.content.find(
    function contentFindSuccess(items) {
        var length = items.length; // item's length.

        console.log("found " + length + " items.");
    },
    function contentFindError(event) {
        console.warn('Content API find() failed!', event);
    },
    null,
    new tizen.AttributeFilter(
        'type',
        'EXACTLY',
        'AUDIO'
    ),
    new tizen.SortMode(
        'title',
        'ASC'
    )
);

It doesn't warn it just logs: 'found 0 items.'

响应

2 回复
Marco Buettner

The emulator is clean... no media files are preinstalled how should it fine any audio files on the device? Add some audio files and go for it.

 

J. Schwartz

If it would be so easy. Of course I already pushed some MP3s into the Music folder. And I am also able to see the files with the sample application 'File Manager'. But the 'Media Player' doesn't find anything. On the real Gear S2 it worked even with self added MP3s. The problem exists only in the emulator.