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

Not working from Android 6.0 to downward #6

Closed
huzaifasaeed opened this issue Apr 20, 2020 · 13 comments
Closed

Not working from Android 6.0 to downward #6

huzaifasaeed opened this issue Apr 20, 2020 · 13 comments

Comments

@huzaifasaeed
Copy link

No error display...

I used this code but Android 6 to downward its not set wallpaper
await WallpaperManager.setWallpaperFromFile( file.path, WallpaperManager.HOME_SCREEN);

@huzaifasaeed huzaifasaeed changed the title Not working from Android 6 to downward Not working from Android 6.0 to downward Apr 20, 2020
@codingstark-dev
Copy link

some problem !

@edex96
Copy link

edex96 commented Jun 27, 2020

Issue continues

@AdityaMulgundkar
Copy link
Owner

@huzaifasaeed @refoxdev @edex96 Hey! Although I haven't been able to debug this on my end, I have received a PR that (probably) solves this issue. I have just pushed an update to pub.dev. Can someone please confirm if this issue still persists on v1.0.8? (latest as of today)

@codingstark-dev
Copy link

@AdityaMulgundkar ok bro let me see!

@Mihan786Chistie
Copy link

@AdityaMulgundkar Hi, I have tried in Android 5.0 and it doesn't works there also.

@AdityaMulgundkar
Copy link
Owner

@Mihan786Chistie Thanks for the quick reply. I looked into it & am solving the issue right now. Will post an update here once I have a solution.

@Mihan786Chistie
Copy link

@AdityaMulgundkar Oh Great, Thanks Bro!!

@wahab4222
Copy link

@AdityaMulgundkar Bro error is still continuous. Not setting wallpaper on Android 6.0 to downward. Kindly update the repository please.

@Arie290698
Copy link

@AdityaMulgundkar I also had the same problem for version 1.0.8. The problem is that you cannot set an image as wallpaper for android 6.0 and below.

@wahab4222
Copy link

@AdityaMulgundkar Please leave a reply about setting wallpaper on Android 6.0 and downward.

@AdityaMulgundkar
Copy link
Owner

Hey guys @huzaifasaeed @refoxdev @edex96 @Mihan786Chistie @wahab4222 @Arie290698

I just spent some time on the issue & have pushed a working solution. Since I did not check the previous solution added in #11, I manually tested this out on an emulator & it works just about fine.

To try the new version of wallpaper_manager, simply switch to v1.0.10 in your pubspec.yaml:
dependencies: ... wallpaper_manager: 1.0.10

Note: Android only has support for setting the lock screen wallpaper & for setting the cropping zones since API 24 (Android 6.0 is API 23). So lock screen & cropping functions are directly defaulted to their base values (i.e. directly sets home screen wallpaper in all cases < API 24 & assumes no cropping zones on all cases < API 24) on older devices by this plug-in now.

If in case there's an error & you still face problems in v1.0.10, please feel free to re-open another issue, or drop me a message here.

@hbirdGit
Copy link

v1.0.10 works with Android 6.0 (23).

And thanks for continous updation of this plugin.

@factom2k
Copy link

Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

  • package:wallpaper_manager

For solutions, see https://dart.dev/go/unsound-null-safety
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1157

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 57s
Exception: Gradle task assembleDebug failed with exit code 1

// now i am run command this flutter run --no-sound-null-safety then

Parameter format not correct -
C:\Users\amits\AppData\Local\Pub\Cache\hosted\pub.dev\wallpaper_manager-1.0.10\android\src\main\java\com\mulgundkar\wallpaper_manager\WallpaperManagerPlugin.java:129: error: cannot find symbol
String assetLookupKey = FlutterLoader.getInstance().getLookupKeyForAsset(assetPath);
^
symbol: method getInstance()
location: class FlutterLoader
C:\Users\amits\AppData\Local\Pub\Cache\hosted\pub.dev\wallpaper_manager-1.0.10\android\src\main\java\com\mulgundkar\wallpaper_manager\WallpaperManagerPlugin.java:152: error: cannot find symbol
String assetLookupKey = FlutterLoader.getInstance().getLookupKeyForAsset(assetPath);
^
symbol: method getInstance()
location: class FlutterLoader
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

Compilation failed; see the compiler error output for details.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 20s
Running Gradle task 'assembleDebug'... 21.7s
Exception: Gradle task assembleDebug failed with exit code 1

what is it soution ???????????

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

9 participants