Android Question simplemediamanager load local files

Solution
I'll explain the differences and you should use SetMediaFromFile:

SMM.SetMediaFromFile - Similar to SetMedia but works with local files:
B4X:
SMM.SetMediaFromFile(Panel1, File.DirAssets, "1.jpg", "image/jpeg", Null)

SMM.AddLocalMedia - Adds local media to the internal cache. This method is useful when you want to replace the default loading and error medias.

DonManfred

Expert
Licensed User
Longtime User
Is there any sample code to load local jpg file to simplemediamanager ?
Have you checked the available methods?

Look out for MediaManager.AddLocalMedia
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'll explain the differences and you should use SetMediaFromFile:

SMM.SetMediaFromFile - Similar to SetMedia but works with local files:
B4X:
SMM.SetMediaFromFile(Panel1, File.DirAssets, "1.jpg", "image/jpeg", Null)

SMM.AddLocalMedia - Adds local media to the internal cache. This method is useful when you want to replace the default loading and error medias.
 
Upvote 0
Solution
Top