맥용 안드로이드 개발 셋팅:


아래 링크 따라가서 편하게 따라만 하면 설치가 되니 매우 편했다.


link: http://ylper.blog.me/120128708503

Posted by Jyui

http://androidhuman.tistory.com/entry/안드로이드의-파일-입출력에-필요한-경로를-얻는-방법-총정리

 

 

 

Posted by Jyui

송신
Intent i = new Intent(this, NextActivity.class);
Bitmap b; // your bitmap
ByteArrayOutputStream bs = new ByteArrayOutputStream();
b.compress(Bitmap.CompressFormat.PNG, 50, bs);
i.putExtra("byteArray", bs.toByteArray());
startActivity(i);


수신
if(getIntent().hasExtra("byteArray")) {
    ImageView previewThumbnail = new ImageView(this);
    Bitmap b = BitmapFactory.decodeByteArray(
        getIntent().getByteArrayExtra("byteArray"),0,getIntent().getByteArrayExtra("byteArr
ay").length);       
    previewThumbnail.setImageBitmap(b);
}

 

 

Reference: http://blog.naver.com/zighart8456/159472785

 

 

 

 

Posted by Jyui

//assume that variable b is Bitmap instance

String extStorageDirectory = Environment.getExternalStorageDirectory().toString();
OutputStream outStream = null;
File file = new File(extStorageDirectory, "er.PNG");
try {
    outStream
= new FileOutputStream(file);
    b
.compress(Bitmap.CompressFormat.PNG, 100, outStream);
    outStream
.flush();
    outStream
.close();
}
catch(Exception e)
{}

 

 

 

Reference : http://stackoverflow.com/questions/649154/android-bitmap-save-to-location

 

 

 

 

 

Posted by Jyui

FROM drawable TO bitmap :

Drawable d = ImagesArrayList.get(0); 
Bitmap bitmap = ((BitmapDrawable)d).getBitmap();

 

FROM resource id of drawable TO bitmap:

Bitmap b1 = BitmapFactory.decodeResource(context.getResources(), R.drawable.icon_resource);

 

Reference:

http://stackoverflow.com/questions/3035692/how-to-convert-a-drawable-to-a-bitmap

 

 

 

 

Posted by Jyui

아래의 링크를 따라가서 필요한 프로그램을 다운받고 설치하면 된다.
단, 이클립스 버젼은 갈릴레오로(아직 헬리오스는 불안정한 것 같다.), Mac OS X(Cocoa 64)를 선택한다. Snow Leopard(Mac OS X 10.6.x) 기준임.

Link: http://blog.naver.com/bmwe3/50097180793




Posted by Jyui