일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- 도전의 기회
- nmtui
- 흐린날의 낮술
- COC
- 적절한 타이밍
- rsnapshot
- HttpURLConnection
- i7-8700
- 김영근 올패스
- 슈퍼스타k 2016
- 지리산 소울 김영근
- 센티멘탈
- 퇴근버스 슈퍼스타K 2016
- 질투
- 사랑 그렇게 보내네 김영근
- #만취
- 그게 무슨 의미가 있니
- account ban
- 넬 희망고문
- 3rd party software
- 내 자신의 생각
- CentOS 6 설치 오류
- 해맑게 웃는 너
- 커피레이크
- 흘러가는대로
- 보고싶은 내맘
- 가식의 껍데기
- 퇴근버스 조민욱
- 짝사랑
- 영구정지
- Today
- Total
목록Androiddd (15)
끄적거림들...
FTP 로 파일 업로드 하기 String fileName = "uploadFTP.file";String ftpID = "Id";String ftpPW = "password";boolean uploadResult = false;FTPClient con;con = new FTPClient();try {con.connect("http://ftpLocation", 21);if(con.login(ftpID, ftpPW)) {File file = new File("filePath" + File.separator + fileName);con.enterLocalPassiveMode();con.setBufferSize(1024*1024);con.setFileType(FTP.BINARY_FILE_TYPE);FileInpu..
HttpURLConnection 예제 (POST) try{URL url = new URL("http://httpurlconnection.example"); HttpURLConnection http = (HttpURLConnection) url.openConnection(); http.setDefaultUseCaches(false); http.setDoInput(true); http.setDoOutput(true); http.setRequestMethod("POST"); http.setRequestProperty("content-type", "application/x-www-form-urlencoded"); OutputStreamWriter outStream = new OutputStreamWriter(h..
Android 를 개발하다 보면 서버와의 통신을 위해 HTTP 프로토콜을 사용하게 된다. Java 에서 기본적으로 제공해주는 HttpURLConnection 과 아파치 HTTP Client 가 있는데,뭐가 조을까? -_-; 아파치 HTTP Client 는 다양한 API 를 제공해주며 안정적이고 별다른 버그도 없다.대신... 무겁다;;HttpURLConnection 은 상대적으로 가벼우며 핵심적인 API 만을 가지고 있다. 실제로 개발 중에 아파치에서 제공해주는 HttpClient 객체를 사용하여 통신을 하는 과정에서성능 이슈가 발견되어 (서버와의 통신에 소요되는 시간이 넘 길었다;;;) 고민고민하다가...HttpURLConnection 으로 바꾼적이 있다.물론 바꾸고 난뒤에 성능이 2-4배 정도 빨라진걸..
역시... Android API 는 설명이 잘되어 있다. : ) http://developer.android.com/guide/topics/connectivity/bluetooth.htmlhttp://developer.android.com/training/game-controllers/controller-input.html - AndroidManifest.xml 설정 ... - Bluetooth Adapter 설정BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); if (mBluetoothAdapter == null) { // Device does not support Bluetooth }- Bluetooth Onif (!..
Android L preview 도 나왔겠다.Android Studio 도 써볼겸... ADT 를 update 했더니...잘되던 eclipse 에서 아래와 같은 문구가 -_-;;; This Android SDK requires ADT version 23.0.0 or above. Current version is 22.6. 해결 방법은 간단하다. install new software - already installed22.x 로 된 놈들을 다 날려버린뒤에... eclipse - android 연동할때처럼 install new software - https://dl-ssl.google.com/android/eclipse/ 끝.