Java Question Creating Java liberrary

Asim A Baki

Active Member
Licensed User
Longtime User
I did follow all of steps describes on creating Java library on this link
https://www.b4x.com/android/forum/threads/java-creating-libraries-for-basic4android.6810/

and the results as below
1- I can see my lib in the b4a libraries window and it is check able
2- I can not use it inside my application code when I am writing Dim ml As Mylib it is not working
3- The XML doc that created looks much different than any xml inside the libraries folder
could any one advice me to solve this issue please


here is the java class

package anywheresoftware.b4a.objects ;

import android.telephony.SmsManager;
import anywheresoftware.b4a.BA.Permissions;
import anywheresoftware.b4a.BA.ShortName;

@ShortName("PhoneSms")
@Permissions(values={"android.permission.SEND_SMS"})
public class PhoneSms {
/**
* Sends an Sms message. Note that this method actually sends the message (unlike most other methods that
*create an intent object).
*/
public static void Send(String PhoneNumber, String Text) {
SmsManager sm = SmsManager.getDefault();
sm.sendTextMessage(PhoneNumber, null, Text, null, null);
}
}


here is the XML Doc

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="javadoc">
<target name="javadoc">
<javadoc access="public" classpath="Libs/Core.jar;Libs/B4AShared.jar;Libs/android.jar" packagenames="anywheresoftware.b4a.objects" sourcepath="src;Libs">
<doclet name="BADoclet" path="D:\StudingCasses\EclipseWorkSpace\Doclet"/>
</javadoc>
</target>
</project>
 

Asim A Baki

Active Member
Licensed User
Longtime User
I tried SLC several times and it is not working I do not why , but I wrote the XML document my self similar to the lib folder XML's format and my lib attached correctly to my b3a app and I can see it's methods buut unfortunately now I am facing a new issue attached to this reply as image
 

Attachments

  • B4A.png
    B4A.png
    12.9 KB · Views: 274
Top