live-wallpaper

How to implement double tap for Android live wallpapers?

做~自己de王妃 提交于 2019-12-04 09:33:42
I want to implement a double tap event for a Android live wallpaper. Sadly, I couldn´t find any specific code how to do that. At the moment I´ve found a workarround using the onTouchEvent-method of the Engine-class: public void onTouchEvent(MotionEvent event) { long time = android.os.SystemClock.currentThreadTimeMillis(); if(((time - mLastTouchTime) < 500) && ((time - mLastTouchTime) > 100)) { if(!mIsPlayed && mSound) { mIsPlayed = true; int sound = R.raw.hell; if(mTheme.equals("rose")) sound = R.raw.rose; if(mTheme.equals("greed")) sound = R.raw.greed; MediaPlayer mp = MediaPlayer.create

Live Wallpaper with Game Engine or not?

独自空忆成欢 提交于 2019-12-04 08:42:38
问题 I'd like to develop a live wallpaper. After some research, I concluded that there were two options to create one : Directly, i.e like it's said on Android-Developpers ( http://developer.android.com/resources/articles/live-wallpapers.html ) Or thanks to a game engine like AndEngine ( http://code.google.com/p/andenginelivewallpaperextension/ ) I've never developed Live Wallpaper. Which solution is the easiest and fastest? 回答1: You can handle the drawing directly, as in the Cube example in the

SharedPreference Changes not reflected in my wallpaper service

家住魔仙堡 提交于 2019-12-04 07:37:02
I am making a live wallpaper where i need to change the speed of a vehicle in setting scene and it needs to get reflected back to the wallpaper service when i press the return button. In my preference activity, i save the list preference changes in shared preferences like this :- @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.prefs); ListPreference listPreference = (ListPreference) findPreference("listPref"); currValue = listPreference.getValue(); Log.e("LiveWallpaperSettings", "currvalue " + currValue);

How to use camera live feed as a activity background?

只愿长相守 提交于 2019-12-04 03:20:10
I am trying to make an App in which I need to use camera live feed as a background. (I know its a stupid thing to do but can't help, its a client demand). I have tried doing it using SurfaceView but no success so far. So far whatever I found on Stack Overflow are more of a guesses or directions how to do it but no real time examples or code help is out there. It would be great if someone who has done this before share a piece of code with Stack Overflow users like me. Take a look here: http://developer.android.com/guide/topics/media/camera.html There is all the code you need to make an

Prevent Live Wallpaper orientation change when an application is opened and orientation is changed?

情到浓时终转凉″ 提交于 2019-12-04 02:53:07
I'm having an orientation issue with a Live Wallpaper that I wrote. Basically the canvas will rotate depending on the application opened above it. I tested this and realized that the onSurfaceChanged() method is firing when I return to the home screen from a previously opened application who's orientation was changed. I suppose a better question would be, why does my Live Wallpaper Surface Change when an application is opened and it's orientation changed? Is there a way to prevent my Live Wallpaper orientation from ever changing? Thanks, hope that makes sense? You can handle screen orientation

How to set the Android Live Wallpaper icon (aka “thumbnail”)

和自甴很熟 提交于 2019-12-03 23:33:29
I built my first Android app. It is a Live Wallpaper designed for 2.2. When I press and hold the screen, select Wallpapers and then select Live Wallpapers , my live wallpaper has what looks like a default icon with the name of my live wallpaper overlaid. How do I set this icon? My manifest file has an application icon specified as @drawable/icon Update I think I need to add some info to this question as it poorly describes my problem (sorry). I have all the res/drawable-[hml]dpi/ icons. I named them all icon.png . My manifest file contains <application android:label="@string/app_name" android

Live Wallpaper with Game Engine or not?

柔情痞子 提交于 2019-12-03 01:39:02
I'd like to develop a live wallpaper. After some research, I concluded that there were two options to create one : Directly, i.e like it's said on Android-Developpers ( http://developer.android.com/resources/articles/live-wallpapers.html ) Or thanks to a game engine like AndEngine ( http://code.google.com/p/andenginelivewallpaperextension/ ) I've never developed Live Wallpaper. Which solution is the easiest and fastest? You can handle the drawing directly, as in the Cube example in the SDK. Or you can use OpenGl ES, e.g. via AndEngine, LibGDX, GLWallpaperService, or RenderScript. More work,

How to make Animated Android Live Wallpaper? [closed]

北城余情 提交于 2019-12-02 20:15:28
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Can anyone suggest me of any step by step tutorials on how to make and Android LiveWallpaper. I am not able to find any good tutorials and I am sort of new to this. Take a look at this article from Vogella: http://www.vogella.de/articles/AndroidLiveWallpaper/article.html Start at: 2. Android Wallpaper Example Read the complete tutorial slowly and carefully (helps a lot). 来源: https://stackoverflow.com/questions/9584791

android live wallpapers parallax-scrolling effect

风格不统一 提交于 2019-12-02 11:22:28
when we scroll, the foreground of the home screen (icons, widgets, etc.) moves to the left or right by the full screen width, but the background image (or live wallpaper) only moves by a fraction of that width. My question is how get this effect. till now have done this. SurfaceHolder holder = getSurfaceHolder(); Canvas canvas = null; try { canvas = holder.lockCanvas(); if (canvas != null) { drawCircles(canvas); } } finally { if (canvas != null) holder.unlockCanvasAndPost(canvas); } the draw function is { private void draw(Canvas canvas) { Paint paint = new Paint(); DisplayMetrics

Android: Use WebView for WallpaperService

断了今生、忘了曾经 提交于 2019-12-02 04:25:22
问题 TL;DR: I'm making a live wallpaper using WallpaperService, and I want to draw to it from a WebView. However, when I create the WebView, it's 0 width and height, so nothing draws but the WebView's background color. There is an old fix for that in How to set size of webview in WallpaperService? but it doesn't appear to work in modern Android. I'm hoping to learn how to set the size of the WebView created from a WallpaperService. ORIGINAL POST: I'm making a live wallpaper using WallpaperService,