Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOTH.SCREENS doesn't works properly #19

Open
pife00 opened this issue May 17, 2023 · 1 comment
Open

BOTH.SCREENS doesn't works properly #19

pife00 opened this issue May 17, 2023 · 1 comment

Comments

@pife00
Copy link

pife00 commented May 17, 2023

Works very well in download URL, LOCK and HOME , but, if you use BOTH.SCREENS, sometimes works at home or lock but never with two at the same time,

I use a elevate button on press this code;

void _setWallpaper(BuildContext context, String url) async {
String result;

// Platform messages may fail, so we use a try/catch PlatformException.
try {
result = await AsyncWallpaper.setWallpaper(
url: "$urlBase${url}_mobile.jpg",
wallpaperLocation: AsyncWallpaper.LOCK_SCREEN,
goToHome: true,
toastDetails: ToastDetails.success(),
errorToastDetails: ToastDetails.error(),
)
? 'Wallpaper set'
: 'Failed to get wallpaper.';
} catch (e) {
// No specified type, handles all
print('Something really unknown: $e');
}
}

flutter : Flutter 3.10.0 • channel stable
Dart: 3.0

Xiaomi Redmi note 11
Android : 12 SKW 1.21
MIUI 13

@codenameakshay
Copy link
Owner

This is a problem with some device manufacturers such as Xiaomi, Realme, etc. For this you can use the external apply method setWallpaperFromFileNative or setWallpaperNative to use external app such as Gallery to apply both wallpapers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants