#BridgeLogger: True
Sub Process_Globals
Private OldIntent As Intent
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
End Sub
Sub Activity_Resume
If IsRelevantIntent(Activity.GetStartingIntent) Then
Dim in As JavaObject = Activity.GetStartingIntent
Dim uri As String = in.RunMethod("getParcelableExtra", Array("android.intent.extra.STREAM"))
Try
Log("Loading bitmap from: " & uri)
Dim bmp As Bitmap = LoadBitmapSample("ContentDir", uri, 100%x, 100%y)
Activity.SetBackgroundImage(bmp)
Catch
Log(LastException)
End Try
End If
End Sub
Private Sub IsRelevantIntent(in As Intent) As Boolean
If in.IsInitialized And in <> OldIntent And in.Action = in.ACTION_SEND Then
OldIntent = in
Return True
End If
Return False
End Sub