Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I detect whether my live wallpaper is running in the preview/"Set Wallpaper" activity or on the homescreen

I'd like to draw a text message only when the wallpaper is run from the live wallpaper selection app, in the preview activity. (With the "Set Wallpaper" and "Settings" buttons).

Since I'll have a free and paid version, in the free one I'd also like to make the user aware of the paid versions features, or even enable those features while previewing the wallpaper, but not when it's actually running on the homescreen to avoid annoying them.

Any ideas?

As an alternative, I might just display this information the first time the wallpapers is launched, which will always be from the preview activity.

like image 388
Kai Stavginski Avatar asked Dec 21 '22 00:12

Kai Stavginski


1 Answers

use isPreview() within your onCreateEngine() method.

like image 131
nikos Avatar answered Feb 01 '23 23:02

nikos