GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV Mobile 2024
→
[WM 26] Android 11 access to device photo album
[WM 26] Android 11 access to device photo album
Iniciado por Claire, abr., 21 2022 7:32 PM - Sem resposta
Conecte-se…
Claire
#1
Membro registado
48 mensagems
Publicado em abril, 21 2022 - 7:32 PM
I have a button in my app that is supposed to open up the device photo album so that you can select an image from your photos. With Android 11, it seems like AlbumPicker doesn't work? I've tried a few methods listed like adding in a notification and what not but I can't seem to find anything that works. All I need is for the button to open up the photo album on the device and allow you to select a photo. Then the rest of the code creates a copy of the image and adds it in the app. It's worked just fine up until now (Android 11)
Below is my original code...
s
TempPhoto is string
s
ReducedSizePhoto is string
s
Thumb is string
s
TempPhoto
=
""
s
TempPhoto
=
AlbumPicker
(
)
IF
s
TempPhoto
=
""
THEN
Error
(
ErrorInfo
(
)
)
RETURN
E
ND
HourGlass
(
True
)
ProcessPhoto
(
s
TempPhoto
)
E
XPRESS_WIN_REPORT.IMG_TMP
=
s
TempPhoto
s
ReducedSizePhoto
=
gs
TempDir
+
"r500kb_"
+
DateSys
(
) +
"_"
+
TimeSys
(
) +
".jpg"
IF
fSize
(
s
TempPhoto
) >
500000
THEN
//bytes
IF
dSaveImageJPEG
(
E
XPRESS_WIN_REPORT.IMG_TMP
,
s
ReducedSizePhoto
,
50
) =
False
THEN
Error
(
ErrorInfo
(
)
)
E
ND
E
LSE
fCopyFile
(
s
TempPhoto
,
s
ReducedSizePhoto
)
E
ND
//fDelete(sTempPhoto)
s
Thumb
=
E
XPRESS_WIN_REPORT.GiveMiniatureName
(
s
ReducedSizePhoto
)
CreateMiniature
(
s
ReducedSizePhoto
,
s
Thumb
)
IF
gn
CurrentObsPicturesTaken
=
0
THEN
gs
TempPhoto1
=
s
ReducedSizePhoto
E
XPRESS_WIN_REPORT.IMG_Photo1
=
s
Thumb
E
LSE
gs
TempPhoto2
=
s
ReducedSizePhoto
E
XPRESS_WIN_REPORT.IMG_Photo2
=
s
Thumb
E
ND
HourGlass
(
False
)
gn
TotalPicturesTaken
=
gn
TotalPicturesTaken
+
1
gn
CurrentObsPicturesTaken
=
gn
CurrentObsPicturesTaken
+
1
E
XPRESS_WIN_REPORT.STC_Photo_Counter
=
"# Saved photos: "
+
gn
TotalPicturesTaken
+
" Max allowed: 20"
Close
(
WIN_
PHOTO_SOURCE
)
Denunciar
0
0
→ Voltar para WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto