To get the package name, you can use JavaObject:
B4X:
Dim joBA As JavaObject
joBA.InitializeStatic("anywheresoftware.b4a.BA")
Log("Packagename: " & joBA.GetField("packageName"))
How does one get the b4j package name in code?
www.b4x.com
or if you try to use Me,
you will get something like this:
So, remove the "class " and ".main", you can get the package name.
B4X:
Sub PackageName As String
Return Me.As(String).SubString2("class ".Length, Me.As(String).Length - ".main".Length)
End Sub
Log(PackageName)