Archief voor november, 2013

Flash Colors – Game using seperate Sound Class

Another app in the Google Play Market. This time, I focussed on how to create a seperate class to handle Sounds. The app is quite simple. It shows colors. The user can choose one of 3 playing modes; simple, medium (remember growing series) or hard (remember random series). It was a challenge to work with a seperate Sounds class, that would handle sound playing. For this app, I used SoundPool. There is one other method to play sounds, MediaPlayer. The latter is for large sounds, music and so on. For Flash Colors, a small soundbite is sufficient, so SoundPool will do. First, we create a seperate class that we can invoke when sounds are played ;   import; public class DoSound { private static SoundPool soundPool; private static HashMap<Integer, Integer> soundsMap; static int SoundYeah = 1; static int SoundWrong = 2; public static void initSounds(Context context) { soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 100); soundsMap = new HashMap<Integer, Integer>(); soundsMap.put(SoundYeah, soundPool.load(context, R.raw.yeah, 1)); soundsMap.put(SoundWrong, soundPool.load(context, R.raw.wrong, 1)); } /** Play a given sound in the soundPool */ public static void playSound(Context context, int soundID) { if(soundPool == null || soundsMap == null){ initSounds(context); } float volume = 1.0f;, volume,… >> Lees meer…

We’ve been going steady for Two years

Well, it’s been 2 years now. Last year was way slower then the first, when it comes to developing. However, you won’t see me complaining. The original goal, my mortgage paid by app development is not reached yet. But.. we’re defenatily moving along. Right now, income is about 15% of what it should be. I keep calm, don’t panic and rely on the steady stream of installs apps like “FlitsWoorden” are showing. Currently, I’m working on the next app project. Ofcourse, I’ll keep you posted. Target date for release : Q1 2014.