Android Open Source - android-continuous-voice Main Activity






From Project

Back to project page android-continuous-voice.

License

The source code is released under:

Copyright (c) 2015, Marius Fink - Universit?t Hamburg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ...

If you think the Android project android-continuous-voice listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package de.uniHamburg.informatik.continuousvoice;
/*  w  w w .j  a  v a2s.c om*/
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import de.uniHamburg.informatik.continuousvoice.services.sound.AudioService;
import de.uniHamburg.informatik.continuousvoice.views.fragments.RecognizerFragment;
import de.uniHamburg.informatik.continuousvoice.views.fragments.VisualizerFragment;

public class MainActivity extends Activity {

    //private String TAG = this.getClass().getSimpleName();
    private RecognizerFragment voiceRecognitionFragment;
    private VisualizerFragment visualizationFragment;

    public void createServices() {
        AudioService audioService = new AudioService();
        
        voiceRecognitionFragment = new RecognizerFragment(audioService);
        visualizationFragment = new VisualizerFragment(audioService);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        createServices();

        setContentView(R.layout.activity_main);

        if (savedInstanceState == null) {

            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            if (savedInstanceState == null) {
                getFragmentManager().beginTransaction()
                        .add(R.id.voiceRecognitionFragmentContainer, voiceRecognitionFragment)
                        .add(R.id.visualizationFragmentContainer, visualizationFragment)
                        .commit();
            }
        }

    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
    
    @Override
    public void onPause() {
        super.onPause();
    }
    
    @Override
    public void onStop() {
        super.onStop();
    }
    
}




Java Source Code List

de.uniHamburg.informatik.continuousvoice.MainActivity.java
de.uniHamburg.informatik.continuousvoice.constants.BroadcastIdentifiers.java
de.uniHamburg.informatik.continuousvoice.constants.ServiceControlConstants.java
de.uniHamburg.informatik.continuousvoice.services.recognition.AbstractRecognizer.java
de.uniHamburg.informatik.continuousvoice.services.recognition.IRecognizerControl.java
de.uniHamburg.informatik.continuousvoice.services.recognition.IStatusListener.java
de.uniHamburg.informatik.continuousvoice.services.recognition.ITranscriptionResultListener.java
de.uniHamburg.informatik.continuousvoice.services.recognition.builtIn.AbstractAndroidRecognitionListener.java
de.uniHamburg.informatik.continuousvoice.services.recognition.builtIn.AndroidRecognizer.java
de.uniHamburg.informatik.continuousvoice.services.recognition.dummy.DummyRecognizer.java
de.uniHamburg.informatik.continuousvoice.services.recognition.nuance.NuanceRecognizer.java
de.uniHamburg.informatik.continuousvoice.services.recognition.pocketSphinx.PocketSphinxRecognizer.java
de.uniHamburg.informatik.continuousvoice.services.recognition.webService.ATTWebServiceRecognizer.java
de.uniHamburg.informatik.continuousvoice.services.recognition.webService.AbstractWebServiceRecognizer.java
de.uniHamburg.informatik.continuousvoice.services.recognition.webService.GoogleWebServiceRecognizer.java
de.uniHamburg.informatik.continuousvoice.services.recognition.webService.IspeechWebServiceRecognizer.java
de.uniHamburg.informatik.continuousvoice.services.sound.AudioService.java
de.uniHamburg.informatik.continuousvoice.services.sound.FileMediaRecorder.java
de.uniHamburg.informatik.continuousvoice.services.sound.IAmplitudeListener.java
de.uniHamburg.informatik.continuousvoice.services.sound.IAudioServiceStartStopListener.java
de.uniHamburg.informatik.continuousvoice.services.sound.IRecorder.java
de.uniHamburg.informatik.continuousvoice.settings.GeneralSettings.java
de.uniHamburg.informatik.continuousvoice.settings.Language.java
de.uniHamburg.informatik.continuousvoice.settings.SettingsChangedListener.java
de.uniHamburg.informatik.continuousvoice.views.fragments.RecognizerFragment.java
de.uniHamburg.informatik.continuousvoice.views.fragments.VisualizerFragment.java