How do I upload a picture and change the app wallpaper to the picture, for app with many screen and for long time
-
Use an ImagePicker in Media to pick the image.
-
Use the [FREE] Wallpaper Changer extension to change the wallpaper.
(Set DefaultFileScope to Legacy, and ask the Write permission)
Then use the BackgroundImage property in the Screen to change the background image of the app.
I think it's for 1st time only
What do you mean?
yes, after the app close, image picker is reset and the background is back to white
Then you can use TinyDB to store the picture.
newapp.aia (2.2 KB)
Edit: Power Users, please correct me if I am wrong, maybe errors due to file storage.
-
On Android 11+, no permissions are required if the
ImagePicker
is used. -
No permissions are declared in the Manifest of your app / APK (
newapp.aia
). -
And therefore no permissions can and will not be requested on Android < 10.
-
The
PermissionDenied
event is never triggered. -
Your app just crashes on Android < 10.
-
The reason why permissions are needed on Android < 10 is because when using the
ImagePicker
, AI2 redirects the file to another directory. For Android ≥ 10 this is the ASD, but for Android < 10 it is the/Pictures
folder. -
If you pick the image via
ActivityStarter
, no storage permissions are required on all Android versions.
app_2.aia (667.8 KB)
See also here:
I removed the Solution marker from post #9.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.