cfjedimaster / Cordova-Examples

A collection of Cordova/Ionic/etc demos.
982 stars 1.07k forks source link

Not be able to display image after picked up from gallery #13

Open vanthienpc opened 9 years ago

vanthienpc commented 9 years ago

Test on Android 5.0. Plz help give me solution to resolved this issue. Thanks

cfjedimaster commented 9 years ago

When you debug remotely, what do you see?

vanthienpc commented 9 years ago

I saw imagePicker return image path is file:///data/data/...../cache/filename.jpg. But when I include this path in image tag by ng-src. It's not display image. I don't know why? Could you give me some suggestion to find out what's main reason? Thank you.

cfjedimaster commented 9 years ago

Oh, Angular has restrictions on the URIs you can use. You can fix this - see - http://stackoverflow.com/questions/15606751/angular-changes-urls-to-unsafe-in-extension-page

vanthienpc commented 9 years ago

Ok, thank you so much. Let me check it now

tonino00 commented 9 years ago

Good afternoon. First you have to look at the way in which your folder to find, verify that it is correct. for example :

Divyaganapathy commented 8 years ago

hi @vanthienpc did you find a solution for this issue? Could you please tell me if you have found the solution?

jealvin commented 7 years ago

hi i got this there is no picture data in the tags.picture :( @vanthienpc @cfjedimaster

view code on app.js

process(0, function(data) {
console.log("Done processing");
console.dir(data);
//make a simple str to show stuff
var s = "";
for(var i=0; i
"; s += "By "+data[i].tags.artist+"
"; s += "Album: "+data[i].tags.album+"
"; s += "Url: "+data[i].url + "
"; s += "picture: "+data[i].tags.album+"
"; s += "data: "+ JSON.stringify(data[i].tags, null, 4); + "
"; s += "data: "+ JSON.stringify(data[i].pic, null, 4); + "
"; s += "data: "+ JSON.stringify(data[i].tags.picture, null, 4); + "
"; s += "

"; } result.innerHTML = s; });

app.js = link

쩔어 (ZUTTER) (GD & T.O.P) By BIGBANG Album: MADE Url: file:///storage/emulated/0/Music/10. 쩔어 (ZUTTER) (GD & T.O.P).mp3 picture: MADE data: { "version": "2.3.0", "major": 3, "revision": 0, "flags": { "unsynchronisation": false, "extended_header": false, "experimental_indicator": false }, "size": 215900, "title": "쩔어 (ZUTTER) (GD & T.O.P)", "artist": "BIGBANG", "album": "MADE", "track": "10", "TRCK": { "id": "TRCK", "size": 4, "description": "Track number/Position in set", "data": "10" }, "TALB": { "id": "TALB", "size": 13, "description": "Album/Movie/Show title", "data": "MADE" }, "TIT2": { "id": "TIT2", "size": 53, "description": "Title/songname/content description", "data": "쩔어 (ZUTTER) (GD & T.O.P)" }, "TPE1": { "id": "TPE1", "size": 17, "description": "Lead performer(s)/Soloist(s)", "data": "BIGBANG" } }data: ""data: undefined

LOSER By BIGBANG Album: MADE Url: file:///storage/emulated/0/Music/05. LOSER.mp3 picture: MADE data: { "version": "2.3.0", "major": 3, "revision": 0, "flags": { "unsynchronisation": false, "extended_header": false, "experimental_indicator": false }, "size": 214576, "title": "LOSER", "artist": "BIGBANG", "album": "MADE", "track": "5", "TRCK": { "id": "TRCK", "size": 3, "description": "Track number/Position in set", "data": "5" }, "TALB": { "id": "TALB", "size": 13, "description": "Album/Movie/Show title", "data": "MADE" }, "TPE1": { "id": "TPE1", "size": 17, "description": "Lead performer(s)/Soloist(s)", "data": "BIGBANG" }, "TIT2": { "id": "TIT2", "size": 13, "description": "Title/songname/content description", "data": "LOSER" } }data: ""data: undefined

IF YOU By BIGBANG Album: MADE Url: file:///storage/emulated/0/Music/09. IF YOU.mp3 picture: MADE data: { "version": "2.3.0", "major": 3, "revision": 0, "flags": { "unsynchronisation": false, "extended_header": false, "experimental_indicator": false }, "size": 220461, "title": "IF YOU", "artist": "BIGBANG", "album": "MADE", "track": "9", "TRCK": { "id": "TRCK", "size": 3, "description": "Track number/Position in set", "data": "9" }, "TALB": { "id": "TALB", "size": 13, "description": "Album/Movie/Show title", "data": "MADE" }, "TPE1": { "id": "TPE1", "size": 17, "description": "Lead performer(s)/Soloist(s)", "data": "BIGBANG" }, "TIT2": { "id": "TIT2", "size": 15, "description": "Title/songname/content description", "data": "IF YOU" } }data: ""data: undefined

cfjedimaster commented 7 years ago

Your code didn't really come out right in the description above.

jealvin commented 7 years ago

hi @cfjedimaster im showing the tags that declare at : var tags = ID3.getAllTags(entry.name);

but there is no picture in the array object 'tags' this is what im get : { "version": "2.3.0", "major": 3, "revision": 0, "flags": { "unsynchronisation": false, "extended_header": false, "experimental_indicator": false }, "size": 214576, "title": "LOSER", "artist": "BIGBANG", "album": "MADE", "track": "5", "TRCK": { "id": "TRCK", "size": 3, "description": "Track number/Position in set", "data": "5" }, "TALB": { "id": "TALB", "size": 13, "description": "Album/Movie/Show title", "data": "MADE" }, "TPE1": { "id": "TPE1", "size": 17, "description": "Lead performer(s)/Soloist(s)", "data": "BIGBANG" }, "TIT2": { "id": "TIT2", "size": 13, "description": "Title/songname/content description", "data": "LOSER" } }

can you tell me why? or any suggest?

cfjedimaster commented 7 years ago

A MP3 may not have every piece of data supported by the ID3 spec.

jealvin commented 7 years ago

i have test it on the example folder on this git https://github.com/aadsm/JavaScript-ID3-Reader

it shown the picture you can test it

but on the project mp3 reader on your git it has no picture maybe it because ionic block the function on id3 js

cfjedimaster commented 7 years ago

I'm not quite sure what you are saying. I'm using his code as is - I didn't change it -and if it doesn't properly return a picture when it should, then you need to create a reproduceable case and file a bug on his repo. Does that make sense? My code just uses his library - it doesn't change it, fix it, break it, or anything else.