2013年9月2日 星期一

[LTE] Access Class Barring 筆記

以下參考原文:http://blog.3g4g.co.uk/2013/05/access-class-barring-in-lte-using.html
(外行人整理,有錯誤請指教,感激不盡!)

  Access Class (AC)共分15類。所有的UEs (User Equipments)隨機屬於AC0 ~ 9 其中一種,除此之外,UEs可能會屬於AC 11 ~ 15中的一種或多種,而這5種AC是分配給特定的高優先權使用者使用。

  對屬於AC 0 ~ 9的UE來說,存取網路的行為會受ac-BarringFactor與ac-BarringTime控制。在存取網路之前,UE隨機產生一亂數"Rand",當Rand小於預先設定的ac-BarringFactor時,UE才能進行存取網路的相關動作。也就是說,調低ac-BarringFactor的值會在一定程度上限制UE的存取行為。

  E-UTRAN會透過廣播(Broadcasting)引導各UE的行為,藉此控制不同類別對網路的接入嘗試(像是mobile originated data, mobile originated signalling)。另外UE能根據不同類別的接入嘗試,形成組合的存取控制。



2013年2月8日 星期五

[Android] Phone State Receiver

ref.

http://stackoverflow.com/questions/5948961/how-to-know-whether-i-am-in-a-call-on-android/5949116#5949116

http://stackoverflow.com/questions/6729072/android-phone-state-in-broadcaster-reciever

http://developer.android.com/reference/android/telephony/PhoneStateListener.html#PhoneStateListener()

http://www.eoeandroid.com/thread-8994-1-1.html

2013年1月16日 星期三

[SQLite] SQLiteOpenHelper


public class RecordDBHlp extends SQLiteOpenHelper {

private static final String DATABASE_NAME = "record";
private static final int DATABASE_VERSION = 1;
private static final String TABLE_NAME = "moneyRecord";
private static final String COL_ID = "id";
private static final String COL_COST = "cost";
private static final String COL_NAME = "name";

private static final String TABLE_CREATE = String.format("create table %s ( %s integer primary key autoincrement, %s integer not null, %s text )", TABLE_NAME, COL_ID, COL_COST, COL_NAME);

public RecordDBHlp(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}

@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(TABLE_CREATE);
}

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
};

}