Refer to this I've tried to use AI answer for me, but it doesn't help me clearly.
If I need to convert for B4A (Non-B4XPages) ,How to code?
B4X:
Public Sub CheckForReceivedFiles As LoadResult
Dim Activity As Activity = B4XPages.GetNativeParent(B4XPages.MainPage)
If IsRelevantIntent(Activity.GetStartingIntent) Then
Dim in As Intent = Activity.GetStartingIntent
Dim uri As String
If in.HasExtra("android.intent.extra.STREAM") Then
uri = in.As(JavaObject).RunMethod("getParcelableExtra", Array("android.intent.extra.STREAM"))
Else
uri = in.GetData
End If
Dim res As LoadResult = CreateLoadResult(True, "ContentDir", uri)
ExtractInformationFromURI(res.FileName, res)
Return res
End If
Return CreateLoadResult(False, "", "")
End Sub
If I need to convert for B4A (Non-B4XPages) ,How to code?
Last edited: