package com.lianxin.pubqq.main;

import java.util.LinkedList;
import java.util.List;
import java.util.Random;

import android.app.Activity;
import android.util.Log;
import com.lianxin.panqq.common.GloableParams;
import com.lianxin.panqq.main.BaseApplication;

public class MyApp extends BaseApplication {

    @Override
    public void onCreate() {
        super.onCreate();

    }

	public void addActivity(Activity activity) {
		activityList.add(activity);
	}    
 
    @Override
    public void onLowMemory() {
        super.onLowMemory();
        Log.e("BaseApplication", "onLowMemory");
    }

    @Override
    public void onTerminate() {
        super.onTerminate();
        Log.e("BaseApplication", "onTerminate");
    }

    public int getUser() {
        return GloableParams.m_szUserId;
    }    

	public static int getRandomStreamId() {
		Random random = new Random();
		int randint =(int)Math.floor((random.nextDouble()*10000.0 + 10000.0));
		return randint;
	}   

    /* 设置声音提醒 */
    public static boolean getSoundFlag() {
        return isSOUND;
    }

    public static void setSoundFlag(boolean sound_flag) {
        isSOUND = sound_flag;
    }

    /* 设置震动提醒 */
    public static boolean getVibrateFlag() {
        return isVIBRATE;
    }

    public static void setVibrateFlag(boolean vibrate_flag) {
        isVIBRATE = vibrate_flag;
    }
 
}
