Italian #AdditionalJar:irlib-release.aar

Angelo Messina

Active Member
Licensed User
Longtime User
#AdditionalJar:irlib-release.aar

B4X:
    Dim batteria, memtot, memused, nfile As Int
    Dim sn, version As String
    Dim temperature As Float

    Dim ctxt As JavaObject
    ctxt.InitializeContext
    Dim handler As JavaObject
    handler.InitializeNewInstance("android.os.Handler",   Null)
    irh.InitializeNewInstance("com.rft.irlib.IrHandler", Array(ctxt, handler))

    batteria = irh.RunMethod("GetBattery", Null)
    txtBatteria.Text=batteria
    Log("Batteria: " & batteria)
    memtot = irh.RunMethod("GetMemTot", Null)
    txtMemoria.Text=memtot
    Log("MemTot: " & memtot)

    memused = irh.RunMethod("GetMemUsed", Null)
    Log("MemUsed: " & memused)
  
    nfile =  irh.RunMethod("GetNFile", Null)
    txtNfile.Text=nfile
    Log("NFile: " & nfile)
  
    sn = irh.RunMethod("GetSN", Null)
    txtSN.Text=sn
    Log("SN: " & sn)
  
    version = irh.RunMethod("GetVersion", Null)
    txtVersione.Text=version
    Log("Version: " & version)
    
    temperature = irh.RunMethod("GetTemperature", Null)
    txtTemperatura.Text=temperature
    Log("Temperature: " & temperature)

nessun valore restituito

Public int doDdcmp(int security,int password,int com,java.io.File fName)
Performs an audit revealing with DDCMP protocol
Parameters:
security - Security code For ddcmp revealing
password - Password code For ddcmp revealing
com - option To set communication channel (COM_IR Or COM_RS optionally xored with baud rate COM_BAUD_2400 Or other settings (i.e. COM_DDCMP_DELETE Or COM_DDCMP_LONG_TIMEOUT Or COM_DDCMP_SECAUDIT))
fName - File name To save revealing, If Null revealing Is performed And data stored on Smart RFT
Returns:
Return code status

B4X:
    Dim f As TextWriter
    f.Initialize(File.OpenOutput(File.DirInternal, "Nome.txt", True))
    Dim ret As Int
    Dim Security As Int = 0
    Dim PasswordCode As Int = 0
    Dim COM_IR As Int = 0

ret=irh.RunMethod("doGetFile",Array(Security),Array(PasswordCode),Array(COM_IR),f)

come passare più parametri al metodo doGetFile ?

grazie
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…