기본 콘텐츠로 건너뛰기

5월, 2016의 게시물 표시

Android, access gallery

private static final int REQUEST_PICK_IMAGE = 1 ; protected void ... { ... Intent photoPickerIntent = new Intent(Intent. ACTION_PICK ); photoPickerIntent.setType( "image/*" ); startActivityForResult(photoPickerIntent, REQUEST_PICK_IMAGE ); ... } @Override protected void onActivityResult( final int requestCode, final int resultCode, final Intent data) { switch (requestCode) { case REQUEST_PICK_IMAGE : if (resultCode == RESULT_OK ) { //handle image //data.getData } else { finish(); } break ; default : super .onActivityResult(requestCode, resultCode, data); break ; } }

Android, make Library Project

 ** make aar lib - Create New Project - gradle --  apply plugin : 'com.android.application' -- ->  apply  plugin :  'com.android.library' --  applicationId "xx.xxx.xxxx" -- ->  applicationId  "xx.xxx.xxxx" - Execute Gradle -- -> AAR file ([project name]/app/build/outputs/aar) ref :  http://flowarc.tistory.com/entry/Android-Studio%EC%97%90%EC%84%9C-%EB%82%98%EB%A7%8C%EC%9D%98-Library-%EB%A7%8C%EB%93%A4%EC%96%B4%EB%B3%B4%EA%B8%B0