0

I had originally asked another question, but I think I found a work-around, which presents a new question hah!

I think my question is fairly basic, and I have searched for anything relevant.

When you are setting a live wallpaper in android, before you set the wallpaper, you have a chance to view the wallpaper without being in the background with all of your icons above it. A sort of "preview" of the wallpaper.

Is there a simple java code to force this activity, on a double tap for instance? I want the user to be able to bring the wallpaper to the front on demand basically.

Maybe this isn't possible, but I assume it is as you can do it before you actually set the wallpaper.

Any help would be greatly appreciated.

Thanks,

Jack

Edit-

I should note I think I found a similar question but the English is so bad I can't tell:

How to make directly show live wallpaper in main activity?

    public void StartActivity() {

    WallpaperInfo localWallpaperInfo = ((WallpaperManager) getSystemService("wallpaper")).getWallpaperInfo();
    if (localWallpaperInfo != null) {
        String str1 = localWallpaperInfo.getSettingsActivity();

        if (str1 != null) {
            String str2 = localWallpaperInfo.getPackageName();
            Intent localIntent1 = new Intent();
            ComponentName localComponentName = new ComponentName(str2, str1);
            localIntent1.setComponent(localComponentName);
            localIntent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(localIntent1);
        }
    }
Community
  • 1
  • 1

1 Answers1

0

You can use wallpaper.bringToFront(); With a double tap listener.

Or you can use the answer on the question you have in your edit.

Groot
  • 483
  • 1
  • 9
  • 20
  • Ah ok, I honestly couldn't understand the question at all from the other link I had, so I wasn't sure if the response was correct or not haha. – Jack_Handey Aug 10 '14 at 20:00
  • Well, I got it to bring the settings to front, but I want it to bring the live wallpaper service itself to the front. Any ideas? I have added my code to the OP. – Jack_Handey Aug 10 '14 at 20:41
  • Sorry, I wasn't sure with your question. Try this tutorial by Vogella, they make great tutorials! http://www.vogella.com/tutorials/AndroidLiveWallpaper/article.html – Groot Aug 10 '14 at 21:17
  • Yea the tutorial is good, but still doesn't answer my original question. I could just be reading it wrong. I already have my live wallpaper app done, it works great. But now I just want the ability to bring it to the front, so the user can interact with it without the distraction of the app icons, widgets, etc. – Jack_Handey Aug 11 '14 at 00:54