android-clock-livewallpaper icon indicating copy to clipboard operation
android-clock-livewallpaper copied to clipboard

Incompatibilities with older non-standard Android versions

Open lars-olsson opened this issue 9 years ago • 2 comments

The section of the MainActivity.java runs into problems on older versions of Android (allowed under API requirement 8 given in the manifest) for this section of code:

public void setClockLw(View v) { Intent intent = new Intent( WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER); intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT, new ComponentName(this, ClockWallpaperService.class)); startActivity(intent); }

This could be remedied by checking the version of Android, and disabling this if below API 16, or getting rid of this function altogether, and rely on the user enabling the live wallpaper from the standard way.

It might be somewhat discouraging if someone tries to follow this tutorial, runs on an older device, and finds it force closing on them.

lars-olsson avatar Sep 24 '14 01:09 lars-olsson

Forgot to mention that the problem is due to the Intent WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER not being a requirement in Android prior to API 16.

lars-olsson avatar Sep 24 '14 01:09 lars-olsson

Hey Dear lars-olsson This isa very nice Example of live wallpaper i want to create an App which set a Countdown-timer as a live wallpaper with various animations. i am just new in android Can you make this kind of tutorial or share any idea how can i get lead on this. Thanks In Advance :)

DkCloudAccount avatar Nov 20 '17 07:11 DkCloudAccount