{"id":37039,"date":"2024-11-01T09:54:18","date_gmt":"2024-11-01T09:54:18","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=37039"},"modified":"2024-11-01T13:00:12","modified_gmt":"2024-11-01T13:00:12","slug":"%ec%bd%94%ed%8b%80%eb%a6%b0-%ec%95%88%eb%93%9c%eb%a1%9c%ec%9d%b4%eb%93%9c-%ec%95%b1%ea%b0%9c%eb%b0%9c-%ea%b0%95%ec%a2%8c-%ec%b9%b4%ec%b9%b4%ec%98%a4%ed%86%a1-%ec%95%8c%eb%a6%bc-%eb%a7%8c%eb%93%a4-2","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/37039\/","title":{"rendered":"Kotlin Android app development course, creating KakaoTalk notifications"},"content":{"rendered":"<p><body><\/p>\n<p>Hello! In this course, we will learn how to develop Android apps using Kotlin. Specifically, we will provide a detailed explanation of how to create KakaoTalk notifications and provide example code. KakaoTalk is a familiar messenger app for many users. Therefore, through this course, you will learn how users can receive notifications in real-time. We will cover everything from setting up the basic Android development environment to sending notifications.<\/p>\n<h2>1. Setting Up the Development Environment<\/h2>\n<p>To develop Android apps, you first need to set up the development environment. You can follow the steps below.<\/p>\n<h3>1.1. Installing Android Studio<\/h3>\n<p>Android Studio is the official IDE for developing Android apps. Please install it by following these steps:<\/p>\n<ul>\n<li>Go to the official Android Studio website.<\/li>\n<li>Download the installation file that matches your operating system.<\/li>\n<li>Run the downloaded file and follow the installation wizard.<\/li>\n<\/ul>\n<h3>1.2. Creating a New Project<\/h3>\n<p>After installing Android Studio, create a new project:<\/p>\n<ul>\n<li>Launch Android Studio.<\/li>\n<li>Select &#8220;New Project&#8221;.<\/li>\n<li>Choose &#8220;Empty Activity&#8221; and click &#8220;Next&#8221;.<\/li>\n<li>Enter the project name and click &#8220;Finish&#8221; to create the project.<\/li>\n<\/ul>\n<h2>2. Adding Required Libraries<\/h2>\n<p>To send KakaoTalk notifications, we will use the Kakao API. You can add dependencies via Gradle. Add the following to your <code>build.gradle<\/code> file:<\/p>\n<pre>\ndependencies {\n    implementation \"com.kakao.sdk:v2-user:2.8.0\"\n    implementation \"com.kakao.sdk:v2-push:2.8.0\"\n}\n<\/pre>\n<h2>3. Setting Up KakaoTalk API Key<\/h2>\n<p>To use the KakaoTalk API, you need to register your application and obtain an API key. Follow these steps:<\/p>\n<ul>\n<li>Visit the Kakao developers site, log in, and register your application.<\/li>\n<li>Add the &#8220;Android&#8221; platform on the app information page and register the package name and hash key.<\/li>\n<li>Copy the &#8220;Native App Key&#8221; from &#8220;App Key&#8221; in My Applications.<\/li>\n<\/ul>\n<h2>4. Implementing Notification Functionality<\/h2>\n<p>Now we will implement the functionality to send KakaoTalk notifications. Follow these steps.<\/p>\n<h3>4.1. Configuring AndroidManifest.xml<\/h3>\n<p>Set the permissions required to send notifications. Add the following permissions to your <code>AndroidManifest.xml<\/code> file:<\/p>\n<pre>\n&lt;uses-permission android:name=\"android.permission.INTERNET\"\/&gt;\n&lt;uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"\/&gt;\n&lt;uses-permission android:name=\"com.kakao.talk.authorization\" \/&gt;\n<\/pre>\n<h3>4.2. Writing Notification Sending Code<\/h3>\n<p>Write the code to send notifications in the <code>MainActivity.kt<\/code> file. Refer to the example code below:<\/p>\n<pre>\nimport android.os.Bundle\nimport android.util.Log\nimport androidx.appcompat.app.AppCompatActivity\nimport com.kakao.sdk.common.KakaoSdk\nimport com.kakao.sdk.talk.TalkApiClient\nimport com.kakao.sdk.talk.model.TalkApiResponse\nimport com.kakao.sdk.talk.model.TalkMessage\nimport retrofit2.Call\nimport retrofit2.Callback\nimport retrofit2.Response\n\nclass MainActivity : AppCompatActivity() {\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        \/\/ Initialize KakaoTalk SDK\n        KakaoSdk.init(this, \"YOUR_NATIVE_APP_KEY\")\n\n        sendKakaoTalkMessage()\n    }\n\n    private fun sendKakaoTalkMessage() {\n        val message = TalkMessage(\"Sending notification to a friend.\", \"https:\/\/example.com\/image.png\")\n\n        TalkApiClient.instance.sendMessage(message).enqueue(object : Callback<talkapiresponse> {\n            override fun onResponse(call: Call<talkapiresponse>, response: Response<talkapiresponse>) {\n                Log.d(\"KakaoTalk\", \"Message sent: \" + response.body())\n            }\n\n            override fun onFailure(call: Call<talkapiresponse>, t: Throwable) {\n                Log.e(\"KakaoTalk\", \"Message failed: \" + t.message)\n            }\n        })\n    }\n}\n<\/talkapiresponse><\/talkapiresponse><\/talkapiresponse><\/talkapiresponse><\/pre>\n<h2>5. Receiving User Push Notifications<\/h2>\n<p>Now we need to implement the functionality for users to receive notifications. We will use Firebase Cloud Messaging (FCM) service for this.<\/p>\n<h3>5.1. Setting Up Firebase<\/h3>\n<ul>\n<li>Go to the Firebase Console and create a new project.<\/li>\n<li>Register the Android app and download the Google services JSON file, then add it to the <code>app<\/code> directory of your project.<\/li>\n<\/ul>\n<h3>5.2. Adding FCM Library<\/h3>\n<p>Add the following to your <code>build.gradle (Module: app)<\/code> file:<\/p>\n<pre>\ndependencies {\n    implementation 'com.google.firebase:firebase-messaging:21.0.1'\n}\n<\/pre>\n<h3>5.3. Implementing the Service<\/h3>\n<p>Implement a service to handle FCM messages for receiving push notifications. Create a class like below:<\/p>\n<pre>\nimport com.google.firebase.messaging.FirebaseMessagingService\nimport com.google.firebase.messaging.RemoteMessage\n\nclass MyFirebaseMessagingService : FirebaseMessagingService() {\n    override fun onMessageReceived(remoteMessage: RemoteMessage) {\n        super.onMessageReceived(remoteMessage)\n        \/\/ Handle the notification\n    }\n}\n<\/pre>\n<h2>6. Conclusion<\/h2>\n<p>Now we have learned how to implement KakaoTalk notifications in an Android app using Kotlin. This course covered various topics, including setting up the development environment, integrating the Kakao SDK, and sending and receiving notifications. This process will be very helpful in actual development. Now you can also utilize the KakaoTalk notification feature in your own Android app!<\/p>\n<p>Thank you!<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello! In this course, we will learn how to develop Android apps using Kotlin. Specifically, we will provide a detailed explanation of how to create KakaoTalk notifications and provide example code. KakaoTalk is a familiar messenger app for many users. Therefore, through this course, you will learn how users can receive notifications in real-time. We &hellip; <a href=\"https:\/\/atmokpo.com\/w\/37039\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;Kotlin Android app development course, creating KakaoTalk notifications&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[143],"tags":[],"class_list":["post-37039","post","type-post","status-publish","format-standard","hentry","category-kotlin-android-app-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Kotlin Android app development course, creating KakaoTalk notifications - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/37039\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kotlin Android app development course, creating KakaoTalk notifications - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"Hello! In this course, we will learn how to develop Android apps using Kotlin. Specifically, we will provide a detailed explanation of how to create KakaoTalk notifications and provide example code. KakaoTalk is a familiar messenger app for many users. Therefore, through this course, you will learn how users can receive notifications in real-time. We &hellip; \ub354 \ubcf4\uae30 &quot;Kotlin Android app development course, creating KakaoTalk notifications&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/37039\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T09:54:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-01T13:00:12+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"3\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/37039\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/37039\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"Kotlin Android app development course, creating KakaoTalk notifications\",\"datePublished\":\"2024-11-01T09:54:18+00:00\",\"dateModified\":\"2024-11-01T13:00:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/37039\/\"},\"wordCount\":469,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"Kotlin Android app development\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/37039\/\",\"url\":\"https:\/\/atmokpo.com\/w\/37039\/\",\"name\":\"Kotlin Android app development course, creating KakaoTalk notifications - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T09:54:18+00:00\",\"dateModified\":\"2024-11-01T13:00:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/37039\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/37039\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/37039\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kotlin Android app development course, creating KakaoTalk notifications\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Kotlin Android app development course, creating KakaoTalk notifications - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/37039\/","og_locale":"ko_KR","og_type":"article","og_title":"Kotlin Android app development course, creating KakaoTalk notifications - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"Hello! In this course, we will learn how to develop Android apps using Kotlin. Specifically, we will provide a detailed explanation of how to create KakaoTalk notifications and provide example code. KakaoTalk is a familiar messenger app for many users. Therefore, through this course, you will learn how users can receive notifications in real-time. We &hellip; \ub354 \ubcf4\uae30 \"Kotlin Android app development course, creating KakaoTalk notifications\"","og_url":"https:\/\/atmokpo.com\/w\/37039\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T09:54:18+00:00","article_modified_time":"2024-11-01T13:00:12+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"3\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/37039\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/37039\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"Kotlin Android app development course, creating KakaoTalk notifications","datePublished":"2024-11-01T09:54:18+00:00","dateModified":"2024-11-01T13:00:12+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/37039\/"},"wordCount":469,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["Kotlin Android app development"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/37039\/","url":"https:\/\/atmokpo.com\/w\/37039\/","name":"Kotlin Android app development course, creating KakaoTalk notifications - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T09:54:18+00:00","dateModified":"2024-11-01T13:00:12+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/37039\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/37039\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/37039\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"Kotlin Android app development course, creating KakaoTalk notifications"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/37039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=37039"}],"version-history":[{"count":2,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/37039\/revisions"}],"predecessor-version":[{"id":38130,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/37039\/revisions\/38130"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=37039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=37039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=37039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}