I am trying to use StartActivityForResult in a class however seems it is not possible... what is terrible since I am trying to make classes and not put everything in the main.
However I found the following: https://stackoverflow.com/questions...-method-is-deprecated-what-is-the-alternative
And seems that we are supposed to move away from StartActivityForResult
Is there anyone would care to translate this java code to a inline in the B4A standard? PLEASE PLEASE PLEASE !
So I can use it like this:
However I found the following: https://stackoverflow.com/questions...-method-is-deprecated-what-is-the-alternative
And seems that we are supposed to move away from StartActivityForResult
Is there anyone would care to translate this java code to a inline in the B4A standard? PLEASE PLEASE PLEASE !
So I can use it like this:
Private Sub Transacao(m As Map) Dim stringTransacao As String Dim json As JSONGenerator json.Initialize(m) stringTransacao = json.ToString LogColor("**********************", Colors.Green) LogColor("Transacao", Colors.Green) LogColor(stringTransacao, Colors.Green) LogColor("**********************", Colors.Green) Dim i As Intent i.Initialize(i.ACTION_SEND,"") i.SetComponent("br.com.destaxa.destaxapay/.TransactionActivity") i.PutExtra("transacao",stringTransacao) StartActivityForResult(i) End Sub Private Sub ion_Event (MethodName As String, Args() As Object) As Object Log(Args(0)) Log(Args(1)) If -1 = Args(0) Then 'resultCode = RESULT_OK Dim i As Intent = Args(1) Log(i.ExtrasToString) End If Return Null End Sub:
Private Sub Transacao(m As Map)
Dim stringTransacao As String
Dim json As JSONGenerator
json.Initialize(m)
stringTransacao = json.ToString
Dim i As Intent
i.Initialize(i.ACTION_SEND,"")
i.SetComponent("br.com.destaxa.destaxapay/.TransactionActivity")
i.PutExtra("transacao",stringTransacao)
StartActivityForResult(i)
End Sub
Private Sub ion_Event (MethodName As String, Args() As Object) As Object
Log(Args(0))
Log(Args(1))
If -1 = Args(0) Then 'resultCode = RESULT_OK
Dim i As Intent = Args(1)
Log(i.ExtrasToString) 'received data
End If
Return Null
End Sub