Tayfur Well-Known Member Licensed User Longtime User Jan 7, 2019 #1 Hello; how can i add & use an image in my library project. ( its like a image to insert JAR/XML file)
Hello; how can i add & use an image in my library project. ( its like a image to insert JAR/XML file)
Erel B4X founder Staff member Licensed User Longtime User Jan 7, 2019 #2 You can add files to b4x libs. Upvote 0
Tayfur Well-Known Member Licensed User Longtime User Jan 15, 2019 #3 Erel said: You can add files to b4x libs. Click to expand... Code: Copy Public Sub resimgetir AppLog("Resim getir") Wait For (File.CopyAsync(File.DirAssets, "5009.PNG", "C:\Users\PC1\Desktop", "5009.png")) Complete (Success As Boolean) AppLog("Resim getir :"&Success) End Sub hello @Erel I added image in my library project and complied it. Return is : Spoiler: ERRROR LOGS Waiting for debugger to connect... Resim getir java.io.FileNotFoundException: 5009.PNG at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:209) at anywheresoftware.b4a.objects.streams.File.Copy(File.java:336) at anywheresoftware.b4a.objects.streams.File$3.call(File.java:406) at anywheresoftware.b4a.objects.streams.File$3.call(File.java:1) at anywheresoftware.b4a.BA$4.run(BA.java:272) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Resim getir :false Upvote 0
Erel said: You can add files to b4x libs. Click to expand... Code: Copy Public Sub resimgetir AppLog("Resim getir") Wait For (File.CopyAsync(File.DirAssets, "5009.PNG", "C:\Users\PC1\Desktop", "5009.png")) Complete (Success As Boolean) AppLog("Resim getir :"&Success) End Sub hello @Erel I added image in my library project and complied it. Return is : Spoiler: ERRROR LOGS Waiting for debugger to connect... Resim getir java.io.FileNotFoundException: 5009.PNG at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:209) at anywheresoftware.b4a.objects.streams.File.Copy(File.java:336) at anywheresoftware.b4a.objects.streams.File$3.call(File.java:406) at anywheresoftware.b4a.objects.streams.File$3.call(File.java:1) at anywheresoftware.b4a.BA$4.run(BA.java:272) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Resim getir :false
DonManfred Expert Licensed User Longtime User Jan 15, 2019 #4 Shouldn´t files in the assets be lowercase filenames? rename 5000.PNG to 5000.png and try again Upvote 0
Tayfur Well-Known Member Licensed User Longtime User Jan 15, 2019 #5 DonManfred said: Shouldn´t files in the assets be lowercase filenames? rename 5000.PNG to 5000.png and try again Click to expand... result is same. And I cheked .jar and xml file size is very smal under 10k. The picture is 56k. it s not added. I used old way ; But @Erel writo "You can add files to b4x libs." is it ? https://www.b4x.com/android/forum/threads/new-feature-b4x-lib-a-new-type-of-library.100383/ Upvote 0
DonManfred said: Shouldn´t files in the assets be lowercase filenames? rename 5000.PNG to 5000.png and try again Click to expand... result is same. And I cheked .jar and xml file size is very smal under 10k. The picture is 56k. it s not added. I used old way ; But @Erel writo "You can add files to b4x libs." is it ? https://www.b4x.com/android/forum/threads/new-feature-b4x-lib-a-new-type-of-library.100383/
Erel B4X founder Staff member Licensed User Longtime User Jan 15, 2019 #6 Tayfur said: is it ? https://www.b4x.com/android/forum/threads/new-feature-b4x-lib-a-new-type-of-library.100383/ Click to expand... Yes. Upvote 0
Tayfur said: is it ? https://www.b4x.com/android/forum/threads/new-feature-b4x-lib-a-new-type-of-library.100383/ Click to expand... Yes.
Tayfur Well-Known Member Licensed User Longtime User Jan 15, 2019 #7 Erel said: Yes. Click to expand... Test is ok. it's great, easy and works. Thanks @Erel Upvote 0