Italian startActivityForResult con Java inline

kkkpe

Active Member
Licensed User
Longtime User
Salve, in B4A ho questo codice in Java che avvia un Intent.
Lancio il metodo con javaObject ma non capisco come intercettare il valore di ritorno dato dall'evento onActivityResult nella mia Activity dal codice scritto in Java Inline

B4X:
dim jo as javaobject
jo.InitializeNewInstance("b4a.example.main.ziwiIntegrator",Array(Null,GetActivity))
jo.RunMethod("GetEVA_Stitch",Array(0,0,112,True)

#if java     
  
  public final AlertDialog GetEVA_Stitch(int IrDaSecurity, int IrDaPassword, int boudRate, boolean resetEVACounter) {
        Intent intentScan = new Intent(Intent.ACTION_MAIN);
        Intent intentSend;
        //intentScan.addCategory(ZIWI_PACKAGE);

        //ApplicationInfo targetAppPackage = findTargetAppPackage(intentScan);
        //if (targetAppPackage == null) {
        //    return showDownloadDialog();
        //}
        intentSend = new Intent("sv.ziwi.external");
        intentSend.putExtra("ACTION", "GetEVA_Stitch" );
        intentSend.putExtra("KEY", "" );
        intentSend.putExtra("BOUDRATE", boudRate);
        intentSend.putExtra("IRDA_SECURITY", IrDaSecurity);
        intentSend.putExtra("IRDA_PASSWORD", IrDaPassword);
        intentSend.putExtra("CALLER_ID",getApplicationName(mContext));
        intentSend.putExtra("RESETEVACOUNTER",resetEVACounter);
        startActivityForResult(intentSend , REQUEST_CODE);

        return null;
    }
#End If


Ho provato a fare la stessa cosa con il metodo di Erel StartActivityForResult ma l'intent non si avvia..

Dim i As Intent
i.Initialize(i.ACTION_MAIN,"")
i.SetComponent("sv.ziwi.external")
i.PutExtra("ACTION", "GetEVA_Stitch")
i.PutExtra("KEY", "" )
i.PutExtra("BOUDRATE", 112)
i.PutExtra("IRDA_SECURITY", 0)
i.PutExtra("IRDA_PASSWORD", 0)
i.PutExtra("CALLER_ID","b4a.example")
i.PutExtra("RESETEVACOUNTER",True)
StartActivityForResult(i)

Avete una soluzione?
grazie..
 
Top