Context란 (feat. Perplexity)

Philipy (윤상필)·2025년 11월 26일

안드로이드에서 Context는 앱 내부 여러 기능을 사용할 때 꼭 필요한 ‘환경 정보 객체’입니다.
입문자 기준으로 5줄로 설명하면 아래와 같습니다.


  1. Context는 앱이나 현재 화면(Activity)이 실행 중인 정보와 상태를 담고 있는 특별한 객체입니다.
  2. 앱 코드에서 화면을 띄우거나, 리소스·시스템 기능(Toast, Service, DB 등)에 접근할 때 꼭 필요합니다.
  3. Activity, Application, Service 등 주요 컴포넌트가 모두 Context를 상속해서 사용합니다.
  4. Context 종류에는 applicationContext(앱 전체)와 activityContext(현재 화면)가 있습니다.
  5. 정확한 Context를 고르면 라이프사이클과 메모리 관리가 잘 되고, 오류 없이 원하는 기능을 쓸 수 있습니다[4][6][5][8].

이렇게 이해하면 Android 개발에서 Context의 역할과 중요성을 쉽게 파악할 수 있습니다.

출처
[1][Android] Context 딥 다이브 (1) - 태크민의 우당탕탕 개발 블로그 https://jtm0609.tistory.com/300
[2][TIL/개념] Android의 Context와 ApplicationContext https://sjevie.tistory.com/entry/Android%EC%9D%98-Context%EC%99%80-ApplicationContext
[3][Android/안드로이드] Context는 대체 뭐지? - 솔루션 개발일지 https://solution94.tistory.com/94
[4] Android Context 완벽 이해 - 종류별 사용법과 메모리 누수 해결 https://eunplay.tistory.com/180
[5][Android] Context의 정의와 종류, 예시 - 카미유 테크블로그 https://june0122.tistory.com/16
[6][Android] Context 제대로 알고 사용하자! https://s2choco.tistory.com/10
[7][안드로이드] context에 대하여 https://android-uni.tistory.com/22
[8][Android] Context, 너 대체 뭐야? https://velog.io/@haero_kim/Android-Context-%EB%84%88-%EB%8C%80%EC%B2%B4-%EB%AD%90%EC%95%BC
[9][Android/안드로이드] Context란? - leehochang - 티스토리 https://leehochang.tistory.com/27
[10] 안드로이드 Context 개념 정리 - 샤핀의 blog https://zxcv5500.tistory.com/258

profile
Tech Phase-smith, Karax wannabe

0개의 댓글