I have an Android application with version 1.6 I take the wallpaper and show it on my application. (I do that programatically by calling getWallpaper() on the Activity)
When this is installed on a 2.1 phone, that has live wallpaper, the live wallpaper is not returned by getWallpaper() , because it just returns a Drawable, and live wallpaper probably is another thing.
So the question is, is it possible to show a live wallpaper on the background of a 1.6 application? How?
Thanks
========================================================================================
So far I haven't found a solution for this. I am adding this to better understand the question
To be clear: The app is written for 1.6 so it will work on all 1.6 and higher. The question is: can we write an app with 1.6 as the target, but support live wallpapers if its being run on a 2.1 device??
Thanks
I found a solution:
1) With android.os.Build.VERSION.SDK_INT check what version the phone has. 2) make if/else calls, so for each version you can call the desired method. In this case:
if (android.os.Build.VERSION.SDK_INT >= 7) {
this.setTheme(android.R.style.Theme_Wallpaper);
}
else
{
//something else
}
3) Build the app using 2.1. and set in the manifest uses-sdk android:minSdkVersion="4" so it also runs on 1.6
4) make sure it works on both phones 1.6 and 2.1, because since you have calls to both SDKs, make sure you dont call methods of 2.1 when you are running 1.6 and the other way around.
Thanks for the help