package com.fusi24.rfid.util;

import android.media.AudioManager;
import android.media.SoundPool;

import com.fusi24.rfid.R;

public abstract class LFScanProcessing extends LFSerialPortActivity {

    protected int soundid;
    protected SoundPool soundpool = null;

    public String stringReception = "";

    protected void initSound(){
        soundpool = new SoundPool(1, AudioManager.STREAM_NOTIFICATION, 100);
        soundid = soundpool.load(this, R.raw.rfid_beep, 1);
    }

    @Override
    protected void onStart() {
        super.onStart();

        // Start Reception
        PowerUtil.power("1");
        this.open();
    }

    @Override
    protected void onStop() {
        super.onStop();

        // Stop Reception
        this.close();
        PowerUtil.power("0");
    }
}
