
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.app">
→ Permission 설정
<manifest ... >
// 인터넷 접근 허용
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
// SMS 접근 허용
<uses-permission android:name="android.permission.SEND_SMS"/>
// Camera 접근 허용
<uses-permission android:name="android.permission.CAMERA" />
...
</manifest>
→ Device Compatibility 설정
<manifest ... >
// 컴퍼스 센서가 있는 기기에서만 다운로드 가능하게끔 명시
<uses-feature android:name="android.hardware.sensor.compass"
android:required="true" />
...
</manifest>
차상위 태그. 유일하다
manifest 파일에는 반드시 단 하나의 application 태그가 포함되어야 함
하위속성으로 앱의 구성요소(4대 컴포넌트) 를 정의
속성
모든속성 참조 : https://developer.android.com/guide/topics/manifest/application-element?hl=ko
allowBackup
icon
roundIcon
supportsRtl
theme : themes.xml 에있는 theme 정의한 컴포넌트를 참조.
laebl : 앱 아이콘 하단에 표시될, 앱 이름을 설정
- string xml 파일의 app_name과 연결되어있음.
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Example">
→ application 태그 하위에 존재.
→ 각 컴포넌트들은 Intent를 통해 서로 상호작용 함
→ 각 컴포넌트들은 하나의 독립적인 형태로 존재
→ 각 컴포넌트들은 고유의 기능을 수행함

개요 : 애플리케이션 컴포넌트(구성요소) 간에 작업 수행을 위한 통신수단
특징
모든 속성 참조 : https://developer.android.com/guide/topics/manifest/activity-element?hl=ko
exported
name
theme / label
screenOrientation
- 화면모드를 가로로할지 세로로할지 설정!
- portrait : 세로
- landscape : 가로
<activity
android:name=".ExampleActivity"
android:exported="true">
가장 첫번쨰로 실행될 Activity에는 다음 intent-filter 를 넣어줘야함
<activity android:name=".SplashActivity"
android:screenOrientation="portrait"
android:exported="true"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
속성
예시 : FCM
<service
android:name="..."
android:enabled="true"
android:exported="true"
android:stopWithTask="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
개요 : 안드로이드 OS로부터 발생하는 각종 이벤트,정보 를 받아와 핸들링 하는 컴포넌트
특징
속성
특징
속성
특징
하위요소
<activity
android:name=".SplashActivity"
android:exported="true"
android:theme="@style/Theme.Shoppiandroid.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
→ ex) 스타팅 activity를 intent-filter 와 action & category 로 정의
개요 : 상위 구성요소(4대컴포넌트) 에서 접근할 resource 나 value 데이터를 저장
특징
<meta-data android:name="zoo" android:value="@string/kangaroo" />
<meta-data android:name="zoo" android:resource="@string/kangaroo" />
→ 초기화면 변경
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.shoppi.app">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Shoppiandroid">
<activity
android:name=".SplashActivity"
android:exported="true"
android:theme="@style/Theme.Shoppiandroid.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="false" />
</application>
</manifest>
초기화면에 쓰일 activity를 생성 (SplashActivity)
위에서 아래 순서대로, 화면순서를 맞춰야한다!!!
activity 태그
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.shoppi.app">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Shoppiandroid">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>