S spiroskaras Member Licensed User Longtime User Nov 14, 2023 #1 Is there any sample code to load local jpg file to simplemediamanager ?
Solution Erel Nov 14, 2023 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.
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 Nov 14, 2023 #2 spiroskaras said: Is there any sample code to load local jpg file to simplemediamanager ? Click to expand... Have you checked the available methods? Look out for MediaManager.AddLocalMedia Upvote 0
spiroskaras said: Is there any sample code to load local jpg file to simplemediamanager ? Click to expand... Have you checked the available methods? Look out for MediaManager.AddLocalMedia
S spiroskaras Member Licensed User Longtime User Nov 14, 2023 #3 i was looking for SetMediaFromFile method (example) Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 14, 2023 #4 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
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.