hello guys , im trying to open intent to get uri of selected image but im facing little problem ...To start the intent i, using
and then
any one can help me out here ?
B4X:
Dim i As Intent
i.Initialize("android.intent.action.GET_CONTENT", "")
i.SetType("image/*")
StartActivityForResult(i)
and then
B4X:
Sub ion_Event (MethodName As String, Args() As Object) As Object
If Args(0) = -1 Then 'resultCode = RESULT_OK
Dim i As Intent = Args(1)
Dim jo As JavaObject = i
Dim Uri As String = jo.RunMethod("getParcelableExtra", _
Array As Object("android.intent.extra.?????????")) ' HERE IS THE PROBLEM WHICH CODE SHOULD I USE HERE
Log(Uri)
Log(i)
End If
Return Null
End Sub
Sub StartActivityForResult(i As Intent)
Dim jo As JavaObject = GetBA
ion = jo.CreateEvent("anywheresoftware.b4a.IOnActivityResult", "ion", Null)
jo.RunMethod("startActivityForResult", Array As Object(ion, i))
End Sub
Sub GetBA As Object
Dim jo As JavaObject
Dim cls As String = Me
cls = cls.SubString("class ".Length)
jo.InitializeStatic(cls)
Return jo.GetField("processBA")
End Sub
any one can help me out here ?
Last edited: