I can retrieve a single image shared by another app to mine but I did not find an example retrieving multiple images. Manifest:
which works but here I got stuck ("ACTION_SEND_MULTIPLE" isn't a member of...)
B4X:
AddActivityText(Main,
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>)
which works but here I got stuck ("ACTION_SEND_MULTIPLE" isn't a member of...)
B4X:
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
Log(in.Action)
If in.IsInitialized And in <> OldIntent And (in.Action = in.ACTION_SEND Or in.Action = in.ACTION_SEND_MULTIPLE) Then
OldIntent = in
Return True
End If
Return False
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub