live-wallpaper

How do I move to Live Wallpaper preview from app?

点点圈 提交于 2019-12-17 18:53:40
问题 I've been looking all over for a specific example of this and couldn't find it online anywhere. What I want to do is: From my app click a button and move to the Live Wallpaper preview of my apps live wallpaper, so the user can choose to activate it. Now of what I've read online, I'm to use WallpaperManager's ACTION_CHANGE_LIVE_WALLPAPER with EXTRA_LIVE_WALLPAPER_COMPONENT pointing to my LiveWallpapers ComponentName. Here's my code of what I have so far. Anybody know what I'm doing wrong? As

Set Live Wallpaper Programmatically on Rooted Device Android

馋奶兔 提交于 2019-12-17 06:16:09
问题 Is it possible somehow to set Live Wallpaper programmatically using my Application? I am working on an Application that her purpose is to choose some of the Installed Live Wallpapers on the device and to set it as a Live Wallpaper. This action need to be completed via my Application. As I was researching I found some answers that this can be done with rooting the Android Device? Can some one help me out how to do that exactly? 回答1: Android OS prior to Jelly Bean does not allow you to

AdView requests new add every time SeekBar is touched

混江龙づ霸主 提交于 2019-12-13 20:16:34
问题 I am creating a live wallpaper settings activity. It has a few seek bars and an Ad Mob ad view. Every time I touch one of the seek bars the ad temporarily disappears and then reloads a new add. However, the ad does not change when any of the other preferences are touched. How do I stop the ad from reloading when a seek bar preference is touched? I am pretty stumped on this one :-). Code follows: The ad preference class: import android.app.Activity; import android.content.Context; import

Live wallpaper animation force closing when I add more than 10 frames?

混江龙づ霸主 提交于 2019-12-13 03:05:08
问题 I'm trying to make a simple livewallpaper out of a series of boot animation .pngs... I'm using private static final int NUM_RES = 9; private final Bitmap[] mPics = new Bitmap[NUM_RES]; CubeEngine() { Resources res = getResources(); for (int i = 0; i< NUM_RES; i++) { int id = res.getIdentifier("boot_0010" + (i + 1), "drawable", "minghai.wallpaper"); mPics[i] = BitmapFactory.decodeResource(res, id); } } 9 seems to be the highest I can go. If i set NUM_RES to anything over 9 i get a force close.

Android liveWallpaper background

[亡魂溺海] 提交于 2019-12-12 18:22:25
问题 How do I scroll the background image on an ACTION_MOVE event? Here is my code used to draw the background image: void drawFrame() { final SurfaceHolder holder = getSurfaceHolder(); Canvas c = null; try { c = holder.lockCanvas(); if (c != null) { c.drawBitmap(myBg, 0, 0, mPaint); } } finally { if (c != null) holder.unlockCanvasAndPost(c); } // Reschedule the next redraw mHandler.removeCallbacks(mDrawAnim); if (mVisible && mAnime) { mHandler.postDelayed(mDrawAnim, 50 ); } } 来源: https:/

Prevent Live Wallpaper from changing screen orientation

為{幸葍}努か 提交于 2019-12-12 12:05:42
问题 I'm working on a Live Wallpaper and I would like to keep it always in portrait mode. I know it's possible for an Activity to declare the orientation in the Manifest, but I can't find a way to do the same with a live wallpaper service. Is it possible somehow to tell the Wallpaper Engine to swap the x and y axis in the rendering process or something similar, because I have no idea anymore. 回答1: Use the following method to check for orientation changes public void onSurfaceChanged(SurfaceHolder

SharedPreference Changes not reflected in my wallpaper service

我与影子孤独终老i 提交于 2019-12-12 08:54:43
问题 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");

android image crop and wallpaper settings page

允我心安 提交于 2019-12-12 05:49:14
问题 I would like to implement live wallpaper where user will be able to setup own photo on the phone desktop. Right now I have successfully implemented logic where user can crop any photo from android gallery or camera itself. On the live wallpaper settings page I'd like to implement cropped photo preview. For this purpose, I have implemented SelectImagePreference public class SelectImagePreference extends Preference { public SelectImagePreference(Context context, AttributeSet attributeSet) {

Live Wallpaper crash when tap on Settings

左心房为你撑大大i 提交于 2019-12-12 01:25:40
问题 allways when i tap on Settings... button in Live Wallpaper Picker it stop. And then stop my Live Wallpaper too. Can you help me? wallpaper.xml <?xml version="1.0" encoding="UTF-8"?> <wallpaper xmlns:android="http://schemas.android.com/apk/res/android" android:thumbnail="@drawable/ic_bubbles" android:name="@string/app_name" android:description="@string/app_name" android:settingsActivity="com.chovanec.bubbles.Settings_activity"/> Settings_activity.java package com.chovanec.bubbles; import

Google Developer Console shows 0 supported devices

帅比萌擦擦* 提交于 2019-12-11 23:08:15
问题 I want to publish my app on Google Play but when I upload my .apk file, it shows that it is supported by 0 devices. I know that there is already a few topics about this but I have not find solution in any of them. Below I am attaching source-code of my android manifest. I also would like to mention that I am using LibGDX for this application and it is an Android Live Wallpaper. Also everything works fine on test devices and emulator. Thanks for your answers. <?xml version="1.0" encoding="utf