Android Open Source - misound Sound Bar Application






From Project

Back to project page misound.

License

The source code is released under:

Apache License

If you think the Android project misound 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 com.xiaomi.mitv.soundbarapp;
//w  w  w  .ja  va  2 s . c  om
import android.app.Application;
import android.content.BroadcastReceiver;
import android.content.Intent;
import android.util.Log;

import com.umeng.analytics.MobclickAgent;
import com.xiaomi.market.sdk.XiaomiUpdateAgent;
import com.xiaomi.mitv.soundbar.bluetooth.BTDeviceMonitor;
import com.xiaomi.mitv.soundbar.provider.SoundBarORM;

public class SoundBarApplication extends Application {
    private String TAG ="SoundBarApplication";
    
    @Override
    public void onCreate() {
        super.onCreate();

        SoundBarORM.addSetting(this, SoundBarORM.TryConnectCount, "2");

        Intent iDataIntent = new Intent("com.xiaomi.mitv.idata.server.INTENT_DATA_COLLECTION");
        startService(iDataIntent);

        boolean forcescanbluetooth = false;
        final String boot_start = SoundBarORM.getSettingValue(getApplicationContext(), "boot_start");
        if(boot_start != null && boot_start.equals("1")){
            forcescanbluetooth = true;
            
            Log.d("SoundBarApplication", "will start run soundbar service after 60 seconds, if you want change, please change the databases ");
        }        
        
        //start sound bar service to keep the sound bar connection
        final String value = SoundBarORM.getSettingValue(getApplicationContext(), SoundBarORM.supportMultiConnection);
        if(forcescanbluetooth || (value != null && value.equals("1"))){
            
            //one minutes later
            final int boot_delay_seconds_count = SoundBarORM.getIntValue(getApplicationContext(), SoundBarORM.boot_delay_seconds_count, 80);
        }

        BTDeviceMonitor.listen(getApplicationContext());

        XiaomiUpdateAgent agent = new XiaomiUpdateAgent();
        MobclickAgent.openActivityDurationTrack(false);
    }
    
    BroadcastReceiver mReceiver ;
    @Override
    public void onTerminate() {
        super.onTerminate();
        
        try{
            unregisterReceiver(mReceiver );
        }catch(Exception ne){}
    }
}




Java Source Code List

com.xiaomi.mitv.soundbar.DefaultMisoundDevice.java
com.xiaomi.mitv.soundbarapp.BarInfoUtils.java
com.xiaomi.mitv.soundbarapp.ConnectingActivity.java
com.xiaomi.mitv.soundbarapp.MainActivity2.java
com.xiaomi.mitv.soundbarapp.SoundBarApplication.java
com.xiaomi.mitv.soundbarapp.TestActivity.java
com.xiaomi.mitv.soundbarapp.TypefaceManager.java
com.xiaomi.mitv.soundbarapp.WrapperActivity.java
com.xiaomi.mitv.soundbarapp.diagnosis.DiagnosisFragment.java
com.xiaomi.mitv.soundbarapp.diagnosis.Engine.java
com.xiaomi.mitv.soundbarapp.diagnosis.ViewWrapper.java
com.xiaomi.mitv.soundbarapp.diagnosis.data.Entry.java
com.xiaomi.mitv.soundbarapp.diagnosis.data.Node.java
com.xiaomi.mitv.soundbarapp.diagnosis.data.OrderedList.java
com.xiaomi.mitv.soundbarapp.diagnosis.data.QAElement.java
com.xiaomi.mitv.soundbarapp.eq.EQManager.java
com.xiaomi.mitv.soundbarapp.eq.EQSettingsFragment.java
com.xiaomi.mitv.soundbarapp.eq.EQStyleResource.java
com.xiaomi.mitv.soundbarapp.eq.EQStyle.java
com.xiaomi.mitv.soundbarapp.eq.UserEQControlFragment.java
com.xiaomi.mitv.soundbarapp.faq.FaqDataStore.java
com.xiaomi.mitv.soundbarapp.faq.FaqFragment.java
com.xiaomi.mitv.soundbarapp.fragment.A2dpDlg.java
com.xiaomi.mitv.soundbarapp.fragment.BaseFragment.java
com.xiaomi.mitv.soundbarapp.fragment.FeedbackFragment.java
com.xiaomi.mitv.soundbarapp.fragment.MainEntryFragment.java
com.xiaomi.mitv.soundbarapp.fragment.PanelFragment.java
com.xiaomi.mitv.soundbarapp.fragment.SettingsFragment.java
com.xiaomi.mitv.soundbarapp.player.MediaButtonIntentReceiver.java
com.xiaomi.mitv.soundbarapp.player.MusicUtils.java
com.xiaomi.mitv.soundbarapp.player.PlayListFragment.java
com.xiaomi.mitv.soundbarapp.player.PlayerFragment.java
com.xiaomi.mitv.soundbarapp.player.PlayerService.java
com.xiaomi.mitv.soundbarapp.player.Player.java
com.xiaomi.mitv.soundbarapp.provider.DataProvider.java
com.xiaomi.mitv.soundbarapp.upgrade.FirmwareManager.java
com.xiaomi.mitv.soundbarapp.upgrade.FirmwareZipFile.java
com.xiaomi.mitv.soundbarapp.upgrade.UpdateActivity.java
com.xiaomi.mitv.soundbarapp.upgrade.UpgradeFragment.java
com.xiaomi.mitv.soundbarapp.upgrade.VersionSelectFragment.java
com.xiaomi.mitv.soundbarapp.util.ConfirmActivityDlg.java
com.xiaomi.mitv.soundbarapp.util.Worker.java
com.xiaomi.mitv.widget.GainView.java
com.xiaomi.mitv.widget.GifView.java
com.xiaomi.mitv.widget.LetterIndexSilderBar.java
com.xiaomi.mitv.widget.MiSwitch.java
com.xiaomi.mitv.widget.RoundAnimationView.java
com.xiaomi.mitv.widget.RoundProgressBar.java
com.xiaomi.mitv.widget.RoundSeekBar.java