현재 이미지를불러오료고
스크립트 쪽에서
function Image(){
alert('사진 불러오기');
window.Android.selectImage();
}
이러한식으로 하고있고
안드로이드에서
public class JavaScriptInterface {
private Context context;
public JavaScriptInterface(Context context) {
this.context = context;
}
@JavascriptInterface
public void selectImage() {
Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
intent.setType("image/*");
startActivityForResult(intent, PICK_IMAGE_REQ_CODE);
}
}
대략 이런식으로 넘기고 있는데 스크립트쪽만 가면 죽는데 뭐 연결해 줘야될게 있나요 ? web에서 테스트 하면 이상없이 alert창은 나와요...