main thread in android application

In android sdk document, it's mentioned that all components(Activity, Service, etc) run on the main thread. The main thread is the thread where our code works on.Conventionally, when talk about a Service, we think it this way: void service() {



native programming on android

Besides programming with java, we're also able to do native programming with c or c++ on android platform.To do so, we need a cross compiler target on arm processor for our working platform( windows or linux). So I downloaded Sourcery G++ Lite 2009q3

communicate with service on android

While doing android programming, it's a common sense to use Activity to interact with users and use Service to perform time consuming tasks (actually, such tasks are usually performed on a new thread spawned by the service). A classic example is

logging in android

Android provides a set of powerful log utilities to make our developing life easier. If you've ever used the OutputDebugString function and the DebugView on windows, you'll find they works very similar to android's counterpart in the sense of user

android property system

Property system is an important feature on android. It runs as a service and manages system configurations and status. All these configurations and status are properties. A property is a key/value pair, both of which are of string type.From the

video player demo in android

In this post, I'll show some basic operations in android with a simple video player. The demo shows how to:Use explicit intentList video files with ListView, ContentProvider & MediaProviderRetrieve data from another Activity with

Beginning Android Development

Recently, I get start doing some development on android platform. Having skimmed through android sdk document, I find it’s a very interesting platform with a lot of new concepts compared to other platforms. So, I'd like to write a serial of blog

streaming audio on android

Streaming media refers to the capability of playing media data while the data is being transferred from server. The user doesn't need to wait until full media content has been downloaded to start playing. In media streaming, media content is split

stream audio via udp on android

In this post, I tried to play small audio data chunks with AudioTrack to show the feasibility of streaming audio. It's not straightforward enough. So I updated the sample code to actually transfer audio data with udp.As the image below shows, the


本文參考了官方Dev Guide文檔,簡單介紹Android下的affinities和任務(task)。Activity和Tasktask就好像是能包含很多activity的棧。 預設情況下,一個activity啟動另外一個activity時,兩個activity是放在同一個task棧中的,第二個activity壓入第一個 activity所在的task棧。當使用者按下返回鍵時,第二個activity從棧中彈出,第一個activity又在當前螢幕顯示。這樣,從使用者角度


首先,我們需要一個keystore,當然已經有了的話就不用這一步了: cmd下: 進入到jdk的bin目錄,這樣的話,android.keystore檔案就會產生在這個目錄下,簽名的時候我們需要這個檔案 C:\Program Files\Java\jdk1.6.0_10\bin>keytool -genkey -alias android.keystore -keyalg RSA -validity 20000 -keystore


1 frameworks/base/telephony/java/android/telephony/cdma為使用CDMA具體的電話功能提供的API。1.1) CdmaCellLocation是CellLocation的直接衍生類別,表示了一個CDMA手機通話的位置。CDMA(Code Division Multiple Access)又稱碼分多址,是在無線通訊上使用的技術,CDMA


如何進行Android單元測試Menifest.xml中加入:<application>中加入:<uses-library android:name="android.test.runner" /><application>外面加入:<uses-permission android:name="android.permission.RUN_INSTRUMENTATION" /><instrumentation

如何解決:Android中 Error generating final archive: Debug Certificate expired on 的錯誤

問題概述:在匯入一個app後提示如下錯誤:“Error generating final archive: Debug Certificate expired on 10/09/18 16:30”原因分析:android要求所有的程式必須有簽名,否則就不會安裝該程式。在我們開發過程中,adt使用debug keystore,在


1、要弄清楚這個問題,首先需要弄明白什麼是implicit(隱藏) intent什麼是explicit(明確) intent。Explicit Intent明確的指定了要啟動的Acitivity ,比如以下Java代碼: Intent intent= new Intent(this, B.class)  Implicit Intent沒有明確的指定要啟動哪個Activity ,而是通過設定一些Intent

Android Intent Filter-判斷intent傳遞對象

Android Intent Filter-判斷intent傳遞對象

Android模擬器啟動失敗解決方案(ERROR: the user data image is used by another emulator. aborting)

今天突然發現ANDROID模擬器啟動失敗,log顯示如下錯誤資訊:ERROR: the user data image is used by another emulator. aborting問題原因:avd的加鎖機制使然。 .lock是加鎖,如果程式崩潰等原因導致無法清除這些以.lock結尾的檔案夾,就會出現這個問題,也就是這個avd的鎖沒有被釋放,導致avd manager以為這個avd正在使用當中。解決辦法:刪除C:\Documents and

)Android: 自訂Tab樣式

1.製作4個9patch的tab樣式,可參考android預設的資源 tab_unselected.9.png     tab_selected.9.png    tab_press.9.png    tab_focus.9.png這4個資源分別代表Tab的4種狀態。2.定義Tab的selector樣式(就叫它tab_indicator.xml好了),將其放入drawable檔案夾下,代碼如下: 1 <?xml version="1.0" encoding="utf-8"?> 2

)Android 9 patch 圖片

1. 該格式圖片的特點 2. 製作方式 一 .9.png 格式的檔案的特點   與傳統的png 格式圖片相比, 9.png 格式圖片在圖片四周有一圈一個像素點組成的邊沿,該邊沿用於對圖片的可擴充區和內容顯示區進行定義。    這種格式的圖片在android 環境下具有自適應調節大小的能力。   (1)允許開發人員定義可擴充地區,當需要延伸圖片以填充比圖片本身更大地區時,可擴充區的內容被延展。   (2)允許開發人員定義內容顯示區,用於顯示文字或其他內容    如所示:   

總頁數: 2945 1 .... 80 81 82 83 84 .... 2945 Go to: 前往
Tags Index:



如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。