Time of Update: 2018-12-03
Internal Storage內部儲存空間
Time of Update: 2018-12-03
native的Socket發送位元組流預設是GB2312的,所以在Java方面需要指定GB2312byte[] buffer = new byte[50];StringBuffer strBuf = new StringBuffer();InputStream input = receiver.getInputStream();while((len = input.read(buffer)) != -1) { String newStr = new String(buffer, 0,
Time of Update: 2018-12-03
原文連結:http://android.tgbus.com/Android/tutorial/201105/353147.shtml 建立AIDL服務要比建立普通的服務複雜一些,具體步驟如下: (1)在Eclipse Android工程的Java包目錄中建立一個副檔名為aidl的檔案。該檔案的文法類似於Java代碼,但會稍有不同。詳細介紹見執行個體52的內容。 (2)如果aidl檔案的內容是正確的,ADT會自動產生一個Java介面檔案(*.java)。 (3)
Time of Update: 2018-12-03
android中的一個應用程式可以單獨編譯,編譯後要重建system.img在源碼目錄下執行 . build/envsetup.sh (.後面有空格)就多出一些命令: - croot: Changes directory to the top of the tree. - m: Makes from the top of the tree. - mm: Builds all of the modules in the current directory. - mmm: Builds
Time of Update: 2018-12-03
android客服端上傳圖片到伺服器,使用的xml來傳輸base64編碼後的圖片我使用的是android內建的httpclient來發送post請求的,我也想過自己使用post方式來發送資料,但是,資料在伺服器端進行base64解碼的時候儲存,我也沒找出原因,所以就沒寫出來了發送post請求就是因為post允許一次傳輸的資料量大,因為圖片經過base64編碼後,資料量大,如果採用get或者其他的方式來傳輸資料,傳輸效率不過,而且資料量大小受到限制1.擷取android客服端圖片Java代碼 /
Time of Update: 2018-12-03
Android BinderAndroid Interprocess CommunicationThorsten SchreiberFirst Advisor: Juraj SomorovskySecond Advisor: Daniel Buβmeyer 在看《Android Binder》文檔時,讀到:1. 特權級英文叫ring,並且是需要硬體支援的。Intel的硬體實現了4個特權級,linux只用0和3。2. linux通訊機制:訊號,管道,通訊端,訊息佇列,訊號量,共用記憶體。3.
Time of Update: 2018-12-03
在 frameworks/base/libs/binder/ProcessState.cpp 的 startThreadPool() 函數中,函數一開始,就聲明了:AutoMutex _l(mLock);就去瞭解了一下,不複雜,但感覺很有思想。在 frameworks/base/include/utils/threads.h 中,有:class Mutex { ... ... class Autolock { public: inline
Time of Update: 2018-12-03
android JNI 中有很多需要用到 Native 對象的需求,它的實現非常的簡單,下面以 Paint 為例記錄一下。Paint.java (frameworks\base\graphics\java\android\graphics) public class Paint { public int mNativePaint; public Paint(int flags) { mNativePaint = native_init(); ... .
Time of Update: 2018-12-03
轉自:
Time of Update: 2018-12-03
參考實作:http://blog.csdn.net/belyxiong/article/details/5875993 為android添加底層核心服務參考博文中資訊不全且有小小問題,本文對整個過程稍作整理並對內容作了補全和修正。 user@ubuntu:/$ sudo adb shellroot@android:/ # cd system/lib --> 服務的庫檔案root@android:/ # cd system/bin
Time of Update: 2018-12-03
android 觸控螢幕滑動事件,對應的最小底層事件集到底是怎樣的?當進行滑動操作時,可以通過EventHub Log捕捉到產生的底層events,也可以使用下面的命令:$ adb shell getevent但是產生的events非常多,這些events當中,有很多不是關鍵的。試了好久,終於得到最精簡的結果:說明:type=0, 表示 synctype=1, 表示 keytype=3, code=53,54, value 表示 x,y的值type=3, code=48,50,57,58,
Time of Update: 2018-12-03
本文主要是想測試 threadLoop 線程是不是迴圈執行。1. ThreadTest.cpp#include <binder/IPCThreadState.h>#include <binder/ProcessState.h>#include <utils/threads.h>namespace android { class ThreadTest : public Thread { virtual bool threadLoop();
Time of Update: 2018-12-03
一、建立android project 時缺少R.java這個檔案,按照網上方法右擊工程選擇Android Tools,選擇fix project propertise,這樣做還是不行,自己添加R.java這個檔案時,還是有錯誤,於是乎不知道咋辦,把eclipse刪掉,重新安裝配置,再建立一個工程,居然神奇的好使了,到現在我還不知道咋回事。二、運行android項目時,報一下錯誤:[2012-10-19 17:49:14 - AndroidTest] ----------------------
Time of Update: 2018-12-03
這篇文章來自kandroid,在android源碼中Development/pdk/下也能找到,最近在做android camera 模組實現,正好看到這篇,雖然寫的比較簡潔,大部分還是挺有用,所以記在這裡交流參考。Android 相機簡要:編譯libcamera.so庫時序框圖介面Android 相機子系統將“頂層camera應用程式”與應用程式架構層及使用者空間各類庫(media 庫
Time of Update: 2018-12-03
大體步驟:從這裡下載CTS包確保Android SDK已經安裝好,adb命令已經添加到系統路徑$PATH參考google CTS Guide配置主機和裝置;//這裡說明的很詳細連上ADB;啟動CTS;切換到android-cts目錄,這個目錄在第1步驟下載後的包裡;運行下面命令進入cts控制台android-cts$ ./tools/cts-tradefed在cts控制台下下面命令是,羅列出有效測試計劃:cts-tf > list p測試特定的測試計劃run cts --plan <
Time of Update: 2018-12-03
一個Android.mk file用來向編譯系統描述你的原始碼。具體來說:該檔案是GNU Makefile的一小部分,會被編譯系統解析一次或多次。你可以在每一個Android.mk
Time of Update: 2018-12-03
一、Android power management應用程式層分析 Android提供了android.os.PowerManager類,該類用於控制裝置的電源狀態的切換. 該類對外有三個介面函數: 1、void goToSleep(long time); 強制裝置進入Sleep狀態 要注意許可權問題。 2、newWakeLock(int flags, String tag); 取得相應層次的鎖 flags參數說明:
Time of Update: 2018-12-03
adb是一個萬能的工具,讓你可以管理android裝置的狀態,更多關於adb的資訊可以參考:http://developer.android. com/guide/developing/tools/adb.html.ADB大概有以下用途:在主機上下載安裝apk應用程式,在目標裝置上啟動運行;在主機上啟動目標裝置的shell;使用DDMS(Dalvik Debug Monitor
Time of Update: 2018-12-03
一、Android power management應用程式層分析 Android提供了android.os.PowerManager類,該類用於控制裝置的電源狀態的切換. 該類對外有三個介面函數: 1、void goToSleep(long time); 強制裝置進入Sleep狀態 要注意許可權問題。 2、newWakeLock(int flags, String tag); 取得相應層次的鎖 flags參數說明:
Time of Update: 2018-12-03
adb安裝:1.將Android SDK中plaform-tools/路徑加到系統內容變數中;需登出生效;2.安裝USB驅動;命令列中執行adb helpAndroid Debug Bridge version 1.0.26-d - directs command to the only connected USB device returns an error if more