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

Incompatibilities with older non-standard Android versions #1

Open
lars-olsson opened this issue Sep 24, 2014 · 2 comments
Open

Incompatibilities with older non-standard Android versions #1

lars-olsson opened this issue Sep 24, 2014 · 2 comments

Comments

@lars-olsson
Copy link

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
Copy link
Author

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.

@DkCloudAccount
Copy link

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 :)

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