@@ -0,0 +1,1478 @@
+package com.nordicid.rfiddemo;%0A%0Aimport android.media.AudioManager;%0Aimport android.media.SoundPool;%0A%0Aimport com.nordicid.apptemplate.AppTemplate;%0A%0A/**%0A * Created by Mikko on 22.9.2016.%0A */%0Apublic class Beeper %7B%0A%0A    public static final int SHORT = 0;%0A    public static final int LONG = 1;%0A    public static final int FAIL = 2;%0A    private static final int LAST = 3;%0A%0A    static SoundPool mSoundPool = null;%0A    static boolean mEnabled = true;%0A%0A    static int%5B%5D mSoundIDs = new int%5BLAST%5D;%0A%0A    static public void setEnabled(boolean val) %7B%0A        mEnabled = val;%0A    %7D%0A%0A    static public boolean getEnabled() %7B%0A        return mEnabled;%0A    %7D%0A%0A    static public void beep(int type)%0A    %7B%0A        if (!mEnabled)%0A            return;%0A%0A        if (mSoundPool == null)%0A        %7B%0A            init();%0A        %7D%0A%0A        int id = mSoundIDs%5Btype%5D;%0A        try %7B%0A            mSoundPool.stop(id);%0A        %7D catch (Exception e) %7B %7D%0A        try %7B%0A            mSoundPool.play(id, 1, 1, 1, 0, 1);%0A        %7D catch (Exception e) %7B %7D%0A    %7D%0A%0A    static public void init()%0A    %7B%0A        if (mSoundPool == null)%0A        %7B%0A            mSoundPool = new SoundPool(LAST, AudioManager.STREAM_MUSIC, 0);%0A            mSoundIDs%5BSHORT%5D = mSoundPool.load(AppTemplate.getAppTemplate(), R.raw.blep, 1);%0A            mSoundIDs%5BLONG%5D = mSoundPool.load(AppTemplate.getAppTemplate(), R.raw.bleep, 1);%0A            mSoundIDs%5BFAIL%5D = mSoundPool.load(AppTemplate.getAppTemplate(), R.raw.blipblipblip, 1);%0A        %7D%0A    %7D%0A%7D%0A

Add beeper