WOONO's Blog






Android Platform Source 2.3 다운로드


Android Platform Source를 받으려면 git 와 reps 등을 사용해야 합니다. 

하지만 download 할 때 정말 엄청난 인내를 요구합니다. 

포맷 등을 하고 다시 받기에는 인내심이 부족한듯합니다. 

그래서 source 파일을 통째로 올렸습니다. 

전체 source 아니라 2.3. x 기준입니다 

다른 Platform 에서도 참조할 수 있니 그냥 쓰셔도 무방합니다. 


설치방법  


1. 압축파일을 적당한 폴더에 받고 푼다.


2. 압축을 푼 파일들을 안드로이드가 설치된 디렉토리 "\android-sdk-windows\platforms\android-10\sources"  에 복사한다. (sources 폴더는 기본적으로 없기 때문에 새로 만들고 만든 폴더 아래 복사하면 된다.)



다운로드

 





android_sources.2.3.x.7z


Posted by woono

Codenames, Tags, and Build Numbers

At a high level, Android development happens around families of releases, which use code names ordered alphabetically after tasty treats.

Platform code names, versions, API levels, and NDK releases

The code names match the following version numbers, along with API levels and NDK releases provided for convenience:

Code nameVersionAPI level
(no code name)1.0API level 1
(no code name)1.1API level 2
Cupcake1.5API level 3, NDK 1
Donut1.6API level 4, NDK 2
Eclair2.0API level 5
Eclair2.0.1API level 6
Eclair2.1API level 7, NDK 3
Froyo2.2.xAPI level 8, NDK 4
Gingerbread2.3 - 2.3.2API level 9, NDK 5
Gingerbread2.3.3 - 2.3.7API level 10
Honeycomb3.0API level 11
Honeycomb3.1API level 12, NDK 6
Honeycomb3.2.xAPI level 13
IceCreamSandwich4.0.1 - 4.0.2API level 14, NDK 7
IceCreamSandwich4.0.3API level 15

Starting with Cupcake, individual builds are identified with a short build code, e.g. FRF85B.

The first letter is the code name of the release family, e.g. F is Froyo.

The second letter is a branch code that allows Google to identify the exact code branch that the build was made from, and R is by convention the primary release branch.

The next letter and two digits are a date code. The letter counts quarters, with A being Q1 2009. Therefore, F is Q2 2010. The two digits count days within the quarter, so F85 is June 24 2010.

Finally, the last letter identifies individual versions related to the same date code, sequentially starting with A; A is actually implicit and usually omitted for brevity.

The date code is not guaranteed to be the exact date at which a build was made, and it is common that minor variations added to an existing build re-use the same date code as that existing build.

Source code tags and builds

Starting with Donut, the exact list of tags and builds is in the following table:

BuildTagNotes
DRC83android-1.6_r1.1earliest Donut version, ADP1, ADP2
DRC92android-1.6_r1.2
DRD08android-1.6_r1.3
DRD20android-1.6_r1.4
DMD64android-1.6_r1.5latest Donut version
ESD20android-2.0_r1earliest Eclair version
ESD56android-2.0.1_r1
ERD79android-2.1_r1Nexus One
ERE27android-2.1_r2Nexus One
EPE54Bandroid-2.1_r2.1pNexus One
ESE81android-2.1_r2.1s
EPF21Bandroid-2.1_r2.1p2latest Eclair version
FRF85Bandroid-2.2_r1earliest Froyo version, Nexus One
FRF91android-2.2_r1.1Nexus One
FRG01Bandroid-2.2_r1.2
FRG22Dandroid-2.2_r1.3
FRG83android-2.2.1_r1Nexus One
FRG83Dandroid-2.2.1_r2Nexus One
FRG83Gandroid-2.2.2_r1Nexus One
FRK76android-2.2.3_r1
FRK76Candroid-2.2.3_r2latest Froyo version
GRH55android-2.3_r1earliest Gingerbread version, Nexus S
GRH78android-2.3.1_r1Nexus S
GRH78Candroid-2.3.2_r1Nexus S
GRI40android-2.3.3_r1Nexus One, Nexus S
GRI54android-2.3.3_r1.1Nexus S
GRJ06Dandroid-2.3.4_r0.9Nexus S 4G
GRJ22android-2.3.4_r1Nexus One, Nexus S, Nexus S 4G
GRJ90android-2.3.5_r1Nexus S 4G
GRK39Candroid-2.3.6_r0.9Nexus S
GRK39Fandroid-2.3.6_r1Nexus One, Nexus S
GWK74android-2.3.7_r1latest Gingerbread version, Nexus S 4G
ITL41Dandroid-4.0.1_r1earliest IceCreamSandwich version, Galaxy Nexus
ITL41Dandroid-4.0.1_r1.1Galaxy Nexus
ITL41Fandroid-4.0.1_r1.2Galaxy Nexus
ICL53Fandroid-4.0.2_r1Galaxy Nexus
IML74Kandroid-4.0.3_r1Nexus S
IML77latest IceCreamSandwich version

The branches froyo, gingerbread, ics-mr0, ics-mr1, represent development branches that do not exactly match configurations that were tested by Google. They might contain a variety of changes in addition to the official tagged releases, and those haven't been as thoroughly tested.

Honeycomb GPL modules

For Honeycomb, the entire platform source code isn't available. However, the parts of Honeycomb licensed under the GPL and LGPL are available under the following tags:

BuildTagNotes
HRI39android-3.0_r1earliest Honeycomb version
HRI66android-3.0_r1.1
HWI69android-3.0_r1.2
HRI93android-3.0_r1.3
HMJ37android-3.1_r1
HTJ85Bandroid-3.2_r1
HTK55Dandroid-3.2.1_r1
HTK75Dandroid-3.2.1_r2
HLK75Candroid-3.2.2_r1
HLK75Dandroid-3.2.2_r2
HLK75Fandroid-3.2.4_r1latest Honeycomb version

There is no manifest that contains exactly those. However, there are manifests that allow building those components. The following commands work for 3.0_r1.1, and using other versions can be done by switching the git checkout paramater, and if necessary the -m parameter in repo init. The git checkout command outputs an error for the non-GPL projects, where it can't find the tag in question.

Posted by woono

웹페이지 띄우기

Uri uri = Uri.parse("http://www.google.com");
Intent it  = new Intent(Intent.ACTION_VIEW,uri);
startActivity(it);

구글맵 띄우기

Uri uri = Uri.parse("geo:38.899533,-77.036476");
Intent it = new Intent(Intent.Action_VIEW,uri);
startActivity(it);


구글 길찾기 띄우기

Uri uri = Uri.parse("http://maps.google.com/maps?f=d&saddr=출발지주소&daddr=도착지주소&hl=ko"); Intent it = new Intent(Intent.ACTION_VIEW, uri); startActivity(it);


SMS/MMS 발송

Intent it = new Intent(Intent.ACTION_VIEW);   
it.putExtra("sms_body", "The SMS text");   
it.setType("vnd.android-dir/mms-sms");   
startActivity(it);  
 
 
// SMS 발송
Uri uri = Uri.parse("smsto:0800000123");   
Intent it = new Intent(Intent.ACTION_SENDTO, uri);   
it.putExtra("sms_body", "The SMS text");   
startActivity(it);  
 
 
// MMS 발송
Uri uri = Uri.parse("content://media/external/images/media/23");   
Intent it = new Intent(Intent.ACTION_SEND);   
it.putExtra("sms_body", "some text");   
it.putExtra(Intent.EXTRA_STREAM, uri);   
it.setType("image/png");   
startActivity(it);


이메일 발송

Uri uri = Uri.parse("mailto:xxx@abc.com");
Intent it = new Intent(Intent.ACTION_SENDTO, uri);
startActivity(it);
 
 
Intent it = new Intent(Intent.ACTION_SEND);   
it.putExtra(Intent.EXTRA_EMAIL, "me@abc.com");   
it.putExtra(Intent.EXTRA_TEXT, "The email body text");   
it.setType("text/plain");   
startActivity(Intent.createChooser(it, "Choose Email Client"));  
 
 
Intent it = new Intent(Intent.ACTION_SEND);     
String[] tos = {"me@abc.com"};     
String[] ccs = {"you@abc.com"};     
it.putExtra(Intent.EXTRA_EMAIL, tos);     
it.putExtra(Intent.EXTRA_CC, ccs);     
it.putExtra(Intent.EXTRA_TEXT, "The email body text");     
it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");     
it.setType("message/rfc822");     
startActivity(Intent.createChooser(it, "Choose Email Client"));   
 
 
// extra 추가하기
Intent it = new Intent(Intent.ACTION_SEND);   
it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");   
it.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/mysong.mp3");   
sendIntent.setType("audio/mp3");   
startActivity(Intent.createChooser(it, "Choose Email Client"));
 
 
// 첨부파일을 추가하여 메일 보내기
Intent it = new Intent(Intent.ACTION_SEND);  
it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");  
it.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/eoe.mp3");  
sendIntent.setType("audio/mp3");  
startActivity(Intent.createChooser(it, "Choose Email Client"));


설치 어플 제거

Uri uri = Uri.fromParts("package", strPackageName, null);   
Intent it = new Intent(Intent.ACTION_DELETE, uri);   
startActivity(it);


APK파일을 통해 제거하기

Uri uninstallUri = Uri.fromParts("package", "xxx", null);
returnIt = new Intent(Intent.ACTION_DELETE, uninstallUri);
 
 
// APK파일 설치
Uri installUri = Uri.fromParts("package", "xxx", null);
returnIt = new Intent(Intent.ACTION_PACKAGE_ADDED, installUri);



마켓에서 어플리케이션 검색

Uri uri = Uri.parse("market://search?q=pname:pkg_name");  
Intent it = new Intent(Intent.ACTION_VIEW, uri);  
startActivity(it);  
// 패키지명은 어플리케이션의 전체 패키지명을 입력해야 합니다.
 
 
// 마켓 어플리케이션 상세 화면
Uri uri = Uri.parse("market://details?id=어플리케이션아이디");  
Intent it = new Intent(Intent.ACTION_VIEW, uri);  
startActivity(it);
// 아이디의 경우 마켓 퍼블리싱사이트의 어플을 선택후에 URL을 확인해보면 알 수 있습니다.


구글 검색

Intent intent = new Intent();
intent.setAction(Intent.ACTION_WEB_SEARCH);
intent.putExtra(SearchManager.QUERY,"searchString");


내장 사진 고르기 (Image Selection)

  • android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI
  • android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI
String action = Intent.ACTION_PICK;
Uri uri = android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI;
Intent intent = new Intent(action, uri);
startActivityForResult(intent, SELECT_IMAGE);
 
 
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == SELECT_IMAGE) {
        if (resultCode == Activity.RESULT_OK) {
            Uri selectedImage = data.getData();
            // TODO Do something with the select image URI
        }
    }
}

장치 사용

Camera 사진 촬영

Intent intent2 = new Intent("android.media.action.IMAGE_CAPTURE");
imgUri = Uri.fromFile(photofile);
intent2.putExtra(MediaStore.EXTRA_OUTPUT, imgUri);
startActivityForResult(intent2, 1);


Video 영상 녹화

Intent i = new Intent("android.media.action.VIDEO_CAPTURE");
i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri.fromFile(videofile));
i.putExtra(android.provider.MediaStore.EXTRA_VIDEO_QUALITY, 0);
i.putExtra("android.intent.extra.durationLimit", 60);
startActivityForResult(i, 2);


Audio 음성 녹음

Intent i = new Intent("android.provider.MediaStore.RECORD_SOUND");

음악 파일 재생

Uri playUri = Uri.parse("file:///sdcard/download/everything.mp3");
returnIt = new Intent(Intent.ACTION_VIEW, playUri);


미디어파일 플레이 하기

Intent it = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("file:///sdcard/song.mp3");
it.setDataAndType(uri, "audio/mp3");
startActivity(it);
 
 
Uri uri = Uri.withAppendedPath(
  MediaStore.Audio.Media.INTERNAL_CONTENT_URI, "1");   
Intent it = new Intent(Intent.ACTION_VIEW, uri);   
startActivity(it);


전화 걸기

Uri uri = Uri.parse("tel:xxxxxx");
Intent it = new Intent(Intent.ACTION_DIAL, uri);  
startActivity(it);  
 
 
Uri uri = Uri.parse("tel.xxxxxx");
Intent it = new Intent(Intent.ACTION_CALL,uri);
// 퍼미션을 잊지 마세요. <uses-permission id="android.permission.CALL_PHONE" />

Posted by woono

Android ListView -Sample Code



1. main.xml 에서 Listview 의 이름을 android:id="@android:id/list" 로 작성하지 않고  "@+id/listView1" 등으로 작성해도 된다. 


이해가 안되는 점은 Graphical Layout Editor 에서 ListView를 넣으면 android:id="@+id/listView1"식으로 이름이 생성되는데 Sample들을 보면 하나같이 android:id="@android:id/list" 로 되어 있다


2. Activaty 에서 ListActivaty로 Extended 하지 않아도 된다.


Posted by woono

개발용 글꼴 ProWindow

2012. 4. 1. 10:36 : Dev

개발용 글꼴 ProWindow 입니다.

 

글꼴 이름은 "H_ProWindow (clear type)" 으로 변경하여 배포 합니다.

 

파일을 다운 받으시고 "windows\fonts" 폴더에 복사 하시면 됩니다.

<Edit++ 에서 사용한 모습>

 

<Eclips 에 적용한 모습>



H_ProFontWindows.7z

Posted by woono
다운로드 링크 : http://www.buildroid.com
Posted by woono