Hi there,
my image picker is not working on Android Nougat.
This piece of code works in all Android versions until API Level 24 and 25.
Any thoughts on how to solve that?
This is another approach, but I also need to crop... Struggling with that
Cheers.
my image picker is not working on Android Nougat.
This piece of code works in all Android versions until API Level 24 and 25.
B4X:
Sub btnChoosePhoto_Click
CropImageInGallery(File.DirRootExternal,"crop.jpg")
End Sub
Sub CropImageInGallery(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", 1) 'crop aspects
i.PutExtra("aspectY", 1) 'crop aspects
i.PutExtra("outputX", 200) 'crop size
i.PutExtra("outputY", 200) 'crop size
StartActivity(i)
End Sub
Any thoughts on how to solve that?
This is another approach, but I also need to crop... Struggling with that
B4X:
Dim c As ContentChooser
c.Initialize("CC")
c.Show("image/*", "Select an image")
Cheers.
Last edited: