I made a VirtualHosts.aar library from https://github.com/x-falcon/Virtual-Hosts, and use #AdditionalJar: VirtualHosts.aar import to b4a project.
in java project there are some codes like this :
in b4a I write:
It abnormal in : java.lang.ClassNotFoundException: com.github.xfalcon$vhosts$vservice$startVService , likes can not find the aar library.
in java project there are some codes like this :
Java:
package com.github.xfalcon.vhosts.vservice;
import ...
public class VhostsService extends VpnService {
...
public static void startVService(Context context, int method) {
...
}
in b4a I write:
B4X:
'#AdditionalRes: ..\resource
#AdditionalJar: VirtualHosts.aar
Sub Activity_Create(FirstTime As Boolean)
Dim pm As B4XPagesManager
pm.Initialize(Activity)
'Dim ctxt As JavaObject
'ctxt.InitializeContext
Dim fb As JavaObject
fb.InitializeNewInstance("com.github.xfalcon.vhosts.vservice.startVService",Array("23.101.130.247 microsoft.gointeract.io", 2))
Activity.LoadLayout("mainpage")
WebView1.LoadUrl("https://microsoft.gointeract.io/interact/index?interaction=1461173234028-3884f8602eccbe259104553afa8415434b4581-05d1&accountId=microsoft&appkey=196de13c-e946-4531-98f6-2719ec8405ce&Language=Italian&CountryCode=IT&CountryLanguage=IT&Click%20To%20Call%20Caller%20Id=+31641190689&startedFromSmsToken=QCYw2pA&sessionID=188781095&token=wXVhvi")
End Sub
It abnormal in : java.lang.ClassNotFoundException: com.github.xfalcon$vhosts$vservice$startVService , likes can not find the aar library.
Attachments
Last edited: