Hey everyone, I've been a long time lurker on the XDA forums, but I recently discovered something really cool last night that I wanted to share.
This is my first how-to guide, so please be gentle. ;)
I've found an easy way to make a live wallpaper that reacts to music, all without needing to do any programming. I basically stumbled upon it by accident while trying to debug my own app (will do a full write up of it later because that is an interesting story), but the tl;dr of it is that there's a trivially easy way to repurpose the GlowHeadphones Live Wallpaper app into showing any image that you want and make it react to your songs.
Steps to try what I made:
1. Install the GlowHeadphones Live Wallpaper app (play.google.com/store/apps/details?id=ly.glowbrilliant.lwp).
2. Download the attached zip, unzip it, and put the "glow" directory into /sdcard/glow/ on your Android device. Simplest way would be something like:
cd DIRECTORY_CONTAINING_UNZIPPED_GLOW
adb push glow /sdcard/glow/
3. On your Android device, go to live wallpaper settings and re-select Glow as your live wallpaper to trigger it to reload. Instead of the normal spinning circles wallpaper, you'll get my version. When there are beats in the music, you'll see the black/white Android image light up into green. Here's a video of it: dropbox.com/s/fnlpnl1cl7yefrb/VID_20150124_110511.mp4
Steps to make your own:
1. Change the contents inside the "glow" directory into what you want.
2. Push to device, reload wallpaper, and enjoy!
The key to making your own wallpaper is to have two images, a bottom layer and a top layer. You define these inside custom.xml. The bottom layer is what is shown when there is no music/no beat playing. The top layer is what fades in when it detects a beat. You can control how much it fades by setting minAlpha and maxAlpha (number between 0.0 and 1.0).
Important things to note:
1. custom.xml MUST be put under /sdcard/glow/custom.xml
2. You can put the images anywhere, but you need to make sure to put the full path into custom.xml. For sanity, I recommend just putting the images directly inside /sdcard/glow/
3. Technically you can put more than 2 layers and have them have different min/max alphas so they fade in differently. I haven't made anything good yet with that, but I did try and it seems to work.
This is only scratching the surface of what's possible to mod in this wallpaper. I'm still trying to work out everything and I'll post more as I figure it out, but being able to trivially make a music visualzing live wallpaper is pretty damn cool and I wanted to share. :)
Backstory for anyone who is interested:
I had installed the Glow live wallpaper because I thought having a wallpaper that reacted to music but done with a material design-ish style was pretty cool and missed the original spectrum live wallpaper from stock Android way back when. While poring over adb logcat to debug an issue with my own app, I noticed two interesting lines:
I/ActivityManager( 250): Start proc ly.glowbrilliant.lwp:ly.glowbrilliant.lwp.wallpape rservice for service ly.glowbrilliant.lwp/.GlowWallpaperService: pid=13656 uid=10066 gids={1028}
W/System.err(13656): java.io.FileNotFoundException: /sdcard/glow/custom.xml: open failed: ENOENT (No such file or directory)
This was strange, the wallpaper was working fine. But what was this "custom.xml" file it was trying to open up? I pulled the apk off my phone and decompiled it and found that there was xml parsing logic for loading a completely custom wallpaper! I tried some of the tags and attributes, and voila, next thing I knew, I had a fully working music wallpaper that was customized with images I had picked.
Will write this up in more detail later - right now I have to stop procrastinating and get back to my original bug, lol.
This is my first how-to guide, so please be gentle. ;)
I've found an easy way to make a live wallpaper that reacts to music, all without needing to do any programming. I basically stumbled upon it by accident while trying to debug my own app (will do a full write up of it later because that is an interesting story), but the tl;dr of it is that there's a trivially easy way to repurpose the GlowHeadphones Live Wallpaper app into showing any image that you want and make it react to your songs.
Steps to try what I made:
1. Install the GlowHeadphones Live Wallpaper app (play.google.com/store/apps/details?id=ly.glowbrilliant.lwp).
2. Download the attached zip, unzip it, and put the "glow" directory into /sdcard/glow/ on your Android device. Simplest way would be something like:
cd DIRECTORY_CONTAINING_UNZIPPED_GLOW
adb push glow /sdcard/glow/
3. On your Android device, go to live wallpaper settings and re-select Glow as your live wallpaper to trigger it to reload. Instead of the normal spinning circles wallpaper, you'll get my version. When there are beats in the music, you'll see the black/white Android image light up into green. Here's a video of it: dropbox.com/s/fnlpnl1cl7yefrb/VID_20150124_110511.mp4
Steps to make your own:
1. Change the contents inside the "glow" directory into what you want.
2. Push to device, reload wallpaper, and enjoy!
The key to making your own wallpaper is to have two images, a bottom layer and a top layer. You define these inside custom.xml. The bottom layer is what is shown when there is no music/no beat playing. The top layer is what fades in when it detects a beat. You can control how much it fades by setting minAlpha and maxAlpha (number between 0.0 and 1.0).
Important things to note:
1. custom.xml MUST be put under /sdcard/glow/custom.xml
2. You can put the images anywhere, but you need to make sure to put the full path into custom.xml. For sanity, I recommend just putting the images directly inside /sdcard/glow/
3. Technically you can put more than 2 layers and have them have different min/max alphas so they fade in differently. I haven't made anything good yet with that, but I did try and it seems to work.
This is only scratching the surface of what's possible to mod in this wallpaper. I'm still trying to work out everything and I'll post more as I figure it out, but being able to trivially make a music visualzing live wallpaper is pretty damn cool and I wanted to share. :)
Backstory for anyone who is interested:
I had installed the Glow live wallpaper because I thought having a wallpaper that reacted to music but done with a material design-ish style was pretty cool and missed the original spectrum live wallpaper from stock Android way back when. While poring over adb logcat to debug an issue with my own app, I noticed two interesting lines:
I/ActivityManager( 250): Start proc ly.glowbrilliant.lwp:ly.glowbrilliant.lwp.wallpape rservice for service ly.glowbrilliant.lwp/.GlowWallpaperService: pid=13656 uid=10066 gids={1028}
W/System.err(13656): java.io.FileNotFoundException: /sdcard/glow/custom.xml: open failed: ENOENT (No such file or directory)
This was strange, the wallpaper was working fine. But what was this "custom.xml" file it was trying to open up? I pulled the apk off my phone and decompiled it and found that there was xml parsing logic for loading a completely custom wallpaper! I tried some of the tags and attributes, and voila, next thing I knew, I had a fully working music wallpaper that was customized with images I had picked.
Will write this up in more detail later - right now I have to stop procrastinating and get back to my original bug, lol.