ABOUT ME

Today
Yesterday
Total
  • Flutter android ์ถœ์‹œ ํ›„ kakao login์•ˆ๋˜๋Š” ๋ฌธ์ œ
    ์นดํ…Œ๊ณ ๋ฆฌ ์—†์Œ 2023. 11. 6. 20:44

    [๋ฌธ์ œ์ƒํ™ฉ]

    Flutter android๊ฐ€ ํ…Œ์ŠคํŠธ ๋นŒ๋“œ์˜ ๊ฒฝ์šฐ ๋ฌธ์ œ์—†์ด ์นด์นด์˜ค ๋กœ๊ทธ์ธ์ด ์ด๋ฃจ์–ด์ง€๋‚˜ Play store์— ๋ฐฐํฌ ํ›„์—๋Š” ํ‚คํ•ด์‹œ๋ฌธ์ œ๋กœ ์•ˆ๋˜๋Š” ์ƒํ™ฉ.

    Playconsole์˜ ์•ฑ์„œ๋ช…์„ Kakao๊ฐœ๋ฐœ์ž ์‚ฌ์ดํŠธ์— ๋“ฑ๋กํ•ด๋„ ์ž‘๋™ํ•˜์ง€ ์•Š๋Š” ์ƒํ™ฉ

     

    [ํ•ด๊ฒฐ๋ฐฉ๋ฒ•]

    1. app/src/main/AndroidManifest.xml์œผ๋กœ ์ด๋™ ํ›„

    2. <application ํƒœ๊ทธ ๋‚ด์— ์•„๋ž˜์˜ ๋‚ด์šฉ์„ ์ถ”๊ฐ€

    android:value="kakao๋„ค์ดํ‹ฐ๋ธŒ์•ฑํ‚ค"

     

    ์ถ”๊ฐ€ํ•œ ๊ฒฐ๊ณผ ์•„๋ž˜์™€ ๊ฐ™๋‹ค

    <application
         android:label="์•ฑ์ด๋ฆ„"
         android:name="${applicationName}"
         android:value="kakao๋„ค์ดํ‹ฐ๋ธŒ์•ฑํ‚ค"
         android:icon="@mipmap/ic_launcher"
         android:usesCleartextTraffic="true"
         android:enableOnBackInvokedCallback="true"
         android:requestLegacyExternalStorage="true">

     

    3. <activity ํƒœ๊ทธ ๋‚ด์— ์•„๋ž˜์˜ ๋‚ด์šฉ์„ ์ถ”๊ฐ€

    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
        <data android:scheme="kakao๋„ค์ดํ‹ฐ๋ธŒ์•ฑํ‚ค" android:host="oauth"/>
    </intent-filter>

     

    ์ถ”๊ฐ€ํ•œ ๊ฒฐ๊ณผ ์•„๋ž˜์™€ ๊ฐ™๋‹ค

    <activity
        android:name=".MainActivity"
        android:exported="true"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize"
        android:showWhenLocked="true"
        android:turnScreenOn="true">
        <meta-data
          android:name="io.flutter.embedding.android.NormalTheme"
          android:resource="@style/NormalTheme"
          />
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
        <intent-filter>
            <action android:name="FLUTTER_NOTIFICATION_CLICK" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
            <data android:scheme="kakao๋„ค์ดํ‹ฐ๋ธŒ์•ฑํ‚ค" android:host="oauth"/>
        </intent-filter>
    </activity>

    ๋Œ“๊ธ€

Designed by Tistory.