I'm use this code to get a images from a gallery, and work perfect.
but in GooglePhotos(old picasa) don't work... someone have a solution ?
but in GooglePhotos(old picasa) don't work... someone have a solution ?
B4X:
Sub Gallery(Directory As String, pictureName As String)
Dim i As Intent
i.Initialize(i.ACTION_PICK, "")
i.SetType("image/*")
i.PutExtra("output", ParseUri("file://" & File.Combine(Directory, pictureName))) 'output folder you set OpenCam(File.DirRootExternal, "1.jpg")
i.PutExtra("crop", "true") 'crop ON
i.PutExtra("aspectX", 0) 'crop aspects
i.PutExtra("aspectY", 0) 'crop aspects
i.PutExtra("outputX", 600) 'crop size
i.PutExtra("outputY", 800) 'crop size
StartActivity(i)
End Sub
Sub ParseUri(FileName As String) As Object
Dim r As Reflector
Return r.RunStaticMethod("android.net.Uri", "parse", Array As Object(FileName), Array As String("java.lang.String"))
End Sub