๋ฐ์ํ
Notice
Recent Posts
Recent Comments
Link
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
Tags
- ์๋ฐ
- ์๋ฐ์คํฌ๋ฆฝํธ
- ํ๋ค์ค๊ณต๋ถ
- RESTful API
- ํ๋ค์ค
- Streamlit๊ธฐ๋ณธ
- ํ์ด์ฌ๊ณต๋ถ
- ์๋ฐ๊ธฐ์ด
- ์๋ฐ๊ณต๋ถ
- ์๋๋ก์ด๋ ์คํ๋์ค
- ์๋ฐํ๋ก๊ทธ๋๋ฐ
- MySQL
- db
- Matplotlib ๊ธฐ์ด
- ๋ฐ์ดํฐ๋ฒ ์ด์ค
- streamlit
- ์คํธ๋ฆผ๋ฆฟ ๊ธฐ๋ณธ
- ์คํธ๋ฆผ๋ฆฟ
- ์๋ฐ์คํฌ๋ฆฝํธ ๊ณต๋ถ
- Streamlit๊ธฐ์ด
- ์น๋์๋ณด๋ ๊ธฐ์ด
- Pandas
- ์น๋์๋ณด๋ ์ ์
- JavaScript
- ์๋ฐ์ด๋ณด
- ํ์ด์ฌ
- serverless
- Android
- java
- ์๋๋ก์ด๋ ์ฑ ๊ฐ๋ฐ
Archives
- Today
- Total
ruriruriya
[Android] ์๋๋ก์ด๋ - ์นด๋ฉ๋ผ/ ์จ๋ฒ ์ฒ๋ฆฌ ์ค์ ๋ฐฉ๋ฒ ๋ณธ๋ฌธ
๐คAndroid/Java
[Android] ์๋๋ก์ด๋ - ์นด๋ฉ๋ผ/ ์จ๋ฒ ์ฒ๋ฆฌ ์ค์ ๋ฐฉ๋ฒ
๋ฃจ๋ฆฌ์ผใ 2024. 1. 10. 18:03๋ฐ์ํ
์๋๋ก์ด๋ ์ฑ ๊ฐ๋ฐ ์ ์นด๋ฉ๋ผ์ ์จ๋ฒ ์ฒ๋ฆฌ์ ์ค์ ํ๋ ๋ฐฉ๋ฒ์ ์์๋ณด์.
1. AndroidManifest.xml
๋งจ ์์์ ์ธํฐ๋ท ๊ถํ์ค์ ๊ณผ permission ์ค์ ์ ํด์ค๋ค.
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA"/>
android:authorities="com.sunny.cameraapp๋ณธ์ธ ํจํค์ง๋ช
.fileprovider" ์์
๋ณธ์ธ ํจํค์ง ๋งค๋ฒ ๋ฐ๊ฟ์ผ ํ๋ค
<application
...
<provider
android:authorities="com.sunny.cameraapp.fileprovider"
android:name="androidx.core.content.FileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/fileprovider"/>
</provider>
...
</application>
2.xml - fileprovider.xml ๋ฆฌ์์ค ํ์ผ ์์ฑ
์ฌํ์ฉ ์ฝ๋์ด๋ฏ๋ก ํ์ผ ํต์งธ๋ก ๋ถ์ฌ ๋ฃ๋๋ค.
<?xml version="1.0" encoding="utf-8"?>
<paths>
<root-path
name="root"
path="." />
<cache-path
name="cache"
path="." /> <!--Context.getCacheDir() ๋ด๋ถ ์ ์ฅ์-->
<files-path
name="files"
path="." /> <!--Context.getFilesDir() ๋ด๋ถ ์ ์ฅ์-->
<external-path
name="external"
path="."/> <!-- Environment.getExternalStorageDirectory() ์ธ๋ถ ์ ์ฅ์-->
<external-cache-path
name="external-cache"
path="."/> <!-- Context.getExternalCacheDir() ์ธ๋ถ ์ ์ฅ์-->
<external-files-path
name="images"
path="Pictures" /> <!-- Context.getExternalFilesDir() ์ธ๋ถ ์ ์ฅ์-->
</paths>
3. buil.gradle.kts ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์
dependencies {
implementation("commons-io:commons-io:2.4")
// ์ฌ์ง๊ฐ์ ธ์ค๋ Glide ๋ผ์ด๋ธ๋ฌ๋ฆฌ
implementation ("com.github.bumptech.glide:glide:4.16.0")
}
๋ฐ์ํ