λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°

HttpURLConnection2

[μ•ˆλ“œλ‘œμ΄λ“œ] AsyncTask 와 HttpURLConnection ...(2) Web Sample Code (jsp) 2021.08.26 - [개발/μ•ˆλ“œλ‘œμ΄λ“œ] - [μ•ˆλ“œλ‘œμ΄λ“œ] AsyncTask 와 HttpURLConnection ...(1) Android Sample Code [μ•ˆλ“œλ‘œμ΄λ“œ] AsyncTask 와 HttpURLConnection ...(1) Android Sample Code AsyncTask λž€ 비동기 μž‘μ—…μ„ ν•  수 μžˆλ„λ‘ μ œκ³΅ν•˜λŠ” ν΄λž˜μŠ€μ΄λ‹€. 비동기λ₯Ό μ‚¬μš©ν•˜λŠ” μ΄μœ λŠ”, λ™κΈ°μ‹μœΌλ‘œ μž‘μ—…μ„ ν•˜κ²Œ 되면 main thread μ—μ„œ A thread 둜 κ°€μ„œ μž‘μ—…μ„ ν•˜λ‹€κ°€.. A thread κ°€ λλ‚˜μ•Όλ§Œ λ‹€μ‹œ mai devshin93.tistory.com 1. μ•ˆλ“œλ‘œμ΄λ“œμ™€ HttpURLConnection ν…ŒμŠ€νŠΈλ₯Ό μ§„ν–‰ν•˜κΈ° μœ„ν•΄ μ›Ή ν”„λ‘œμ νŠΈλ₯Ό μƒμ„±ν–ˆλ‹€. (μ•„λž˜ 글을 μ°Έκ³ ν•΄μ„œ μƒˆλ‘œμš΄ ν”„λ‘œμ νŠΈλ₯Ό 생성) 2021.0.. 2021. 9. 14.
[μ•ˆλ“œλ‘œμ΄λ“œ] AsyncTask 와 HttpURLConnection ...(1) Android Sample Code AsyncTask λž€ 비동기 μž‘μ—…μ„ ν•  수 μžˆλ„λ‘ μ œκ³΅ν•˜λŠ” ν΄λž˜μŠ€μ΄λ‹€. 비동기λ₯Ό μ‚¬μš©ν•˜λŠ” μ΄μœ λŠ”, λ™κΈ°μ‹μœΌλ‘œ μž‘μ—…μ„ ν•˜κ²Œ 되면 main thread μ—μ„œ A thread 둜 κ°€μ„œ μž‘μ—…μ„ ν•˜λ‹€κ°€.. A thread κ°€ λλ‚˜μ•Όλ§Œ λ‹€μ‹œ main thread 둜 λŒμ•„ 올 수 μžˆλ‹€. λ§Œμ•½ A thread κ°€ μž‘μ—…μ„ 끝내지 λͺ» ν•˜λ©΄,,, main thread λŠ” λ‹€μŒ μž‘μ—…μ„ ν•  수 μ—†λŠ” 것이닀. λΉ„λ™κΈ°μ‹μœΌλ‘œ μž‘μ—…μ„ ν•˜κ²Œ 되면 main thread λŠ” main thread λŒ€λ‘œ.. A thread λŠ” A thread λŒ€λ‘œ... μž‘μ—…μ„ 진행할 수 있게 λœλ‹€. HttpURLConnection 을 μ΄μš©ν•΄ jsp μ„œλ²„λ‘œ 데이터λ₯Ό 보내고, jsp μ„œλ²„λ‘œλΆ€ν„° 데이터λ₯Ό λ°›λŠ” κ°„λ‹¨ν•œ μƒ˜ν”Œμ„ λ§Œλ“€μ–΄ 보자. λ°μ΄ν„°λŠ” JSONObjec.. 2021. 8. 26.