rfresh Well-Known Member Licensed User Longtime User Dec 13, 2020 #1 How do I get to the DiskUtil lib? I don't see it in the Libraries Manager tab.
stevel05 Expert Licensed User Longtime User Dec 13, 2020 #2 Do you mean this one? https://www.b4x.com/android/forum/threads/disk-space-utils.47520/post-294230 Upvote 0
rfresh Well-Known Member Licensed User Longtime User Dec 13, 2020 #3 Yes but I'm trying to find out where to put it so I can access it? Upvote 0
stevel05 Expert Licensed User Longtime User Dec 13, 2020 #4 I haven't tried it, but it says it's a code module. So unzip the file and you should have a .bas file which you can load using Project/Add Existing Module or drag and drop it from the file explorer onto the Modules tab. Upvote 0
I haven't tried it, but it says it's a code module. So unzip the file and you should have a .bas file which you can load using Project/Add Existing Module or drag and drop it from the file explorer onto the Modules tab.
rfresh Well-Known Member Licensed User Longtime User Dec 14, 2020 #5 Sorry, no, not that one, this one: JDiskutil But that one only has a .jar file and an .xml file. I don't know what I need to do with one or both of them to access its methods? Upvote 0
Sorry, no, not that one, this one: JDiskutil But that one only has a .jar file and an .xml file. I don't know what I need to do with one or both of them to access its methods?
klaus Expert Licensed User Longtime User Dec 14, 2020 #6 Simply copy both files into your AdditionalLibraries\B4J folder. You may have a look HERE. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Dec 14, 2020 #7 Moved to the questions forum. You should never post questions in any other forum. Upvote 0
rfresh Well-Known Member Licensed User Longtime User Dec 14, 2020 #8 klaus said: Simply copy both files into your AdditionalLibraries\B4J folder. You may have a look HERE. Click to expand... Got it. Thanks Klaus. I'm able to get the disk serial number to display OK using Log() with this line: B4X: Dim diskserial As DiskUtil diskserial.Initialize("DiskSerial") Log("diskserial " & diskserial.getSerialNumber("c:\")) But when my project runs, I also see this in the Log window: java.lang.Exception: Sub diskserial_result was not found. Upvote 0
klaus said: Simply copy both files into your AdditionalLibraries\B4J folder. You may have a look HERE. Click to expand... Got it. Thanks Klaus. I'm able to get the disk serial number to display OK using Log() with this line: B4X: Dim diskserial As DiskUtil diskserial.Initialize("DiskSerial") Log("diskserial " & diskserial.getSerialNumber("c:\")) But when my project runs, I also see this in the Log window: java.lang.Exception: Sub diskserial_result was not found.
DonManfred Expert Licensed User Longtime User Dec 14, 2020 #9 So the lib is raising an Event for which you did not use a Eventsub. Check the library for the exact signature needed for the sub diskserial_result Upvote 0
So the lib is raising an Event for which you did not use a Eventsub. Check the library for the exact signature needed for the sub diskserial_result
rfresh Well-Known Member Licensed User Longtime User Dec 14, 2020 #10 There is only a .jar file and an .xml file. I did not find the string "diskserial_result" in the .xml file. Upvote 0
There is only a .jar file and an .xml file. I did not find the string "diskserial_result" in the .xml file.
DonManfred Expert Licensed User Longtime User Dec 14, 2020 #11 rfresh said: There is only a .jar file and an .xml file. I did not find the string "diskserial_result" in the .xml file. Click to expand... "discserial" is the Eventprefix YOU DID SET From the XML <event>result(Successful As Boolean, DriveSerial as String)</event> <event>drives(Successful As boolean, DriveNames() As Object)</event> Click to expand... create the missing Event sub B4X: sub discserial_result(Successful As Boolean, DriveSerial as String) End sub Upvote 0
rfresh said: There is only a .jar file and an .xml file. I did not find the string "diskserial_result" in the .xml file. Click to expand... "discserial" is the Eventprefix YOU DID SET From the XML <event>result(Successful As Boolean, DriveSerial as String)</event> <event>drives(Successful As boolean, DriveNames() As Object)</event> Click to expand... create the missing Event sub B4X: sub discserial_result(Successful As Boolean, DriveSerial as String) End sub