پیام خود را به سطح بعدی ببرید - ابتدایی، بهتر و بهترین
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
این سند پیشرفت بهینه یک برنامه پیام رسانی را از یک مکان شروع احتمالی به بهترین در کلاس نمودار می کند. این طراحی شده است تا به شما کمک کند در طول زمان به افزایش مقیاس برنامه خود فکر کنید و چه ویژگی هایی را در چه زمانی پیاده سازی کنید. در حالی که هر برنامه رسانه ای متفاوت است، این توصیه ها را برای دستیابی به بهترین برنامه در کلاس خود در نظر بگیرید.
برنامه پیام رسانی اولیه
یک برنامه پیامرسانی پایه یک تجربه ارتباطی مبتنی بر متن را در اختیار کاربران قرار میدهد که ممکن است شامل موارد زیر باشد:
برنامه پیام رسانی بهتر
یک برنامه پیام رسانی بهتر به کاربران ابزارهای بیشتری برای بهبود ارتباطات و ارائه خود بیان می دهد، از جمله:
ایموجی
از ایموجی های مدرن پشتیبانی کنید.
اعلانهای فشاری با Intent
از محمولهها با Firebase Cloud Messaging (FCM) استفاده کنید تا کاربران را از طریق اعلان به مکالمات یا بخشهای خاصی از برنامه هدایت کنید . این باعث کاهش مراحلی می شود که کاربران برای رسیدن به محتوای مهم باید بردارند. ()
گفتگوهای رشته ای
برای حفظ متن و جریان مکالمات، پاسخ به پیامهای خاص را در چتهای گروهی پیادهسازی کنید. این ویژگی برای سازماندهی و قابل فهم نگه داشتن ارتباطات گروهی بسیار مهم است.
صفحه کلیدهای تصویر، کشیدن و رها کردن، و سایر محتوای غنی
محتوای غنی مانند تصاویر، فیلم ها و فایل های صوتی را دریافت کنید. API شامل پشتیبانی از صفحهکلیدهای تصویری و یک هدف کشیدن و رها کردن است تا کاربران بتوانند برچسبها، انیمیشنها و سایر رسانهها را به پیامهای خود اضافه کنند. همچنین، مطمئن شوید که برنامه شما به عنوان یک منبع کشیدن و رها کردن برای اشتراکگذاری محتوا با برنامههای دیگر کار میکند.
جستجو در مکالمات
جستجوی متن کامل را در مکالمات فعال کنید تا کاربران بتوانند به سرعت پیام ها، تصاویر، پیوندها و فایل ها را پیدا کنند. از فیلتر کردن بر اساس تاریخ، شخص یا نوع محتوا برای جستجوی کارآمد پشتیبانی کنید.
پشتیبانی از رسانه و فایل
پشتیبانی یکپارچه برای ارسال و دریافت تصاویر ، فیلم ها، اسناد و فایل های دیگر با پیش نمایش های درون خطی و نشانگرهای واضح برای وضعیت دانلود و آپلود.
اطلاعیه ها
پیامرسانی پیشرفته Firebase Cloud (FCM)
از ویژگیهای پیشرفته Firebase Cloud Messaging مانند محمولههای داده برای به حداقل رساندن تأخیر و رفتوآمدهای پرهزینه سرور استفاده کنید.
رسیدها را بخوانید
این گزینه را برای کاربران فراهم کنید تا نمایان بودن رسیدهای خوانده شده را مدیریت کنند. این می تواند یک جابجایی ساده در تنظیمات باشد که به کاربران امکان می دهد حریم خصوصی را به جای تأیید انتخاب کنند.
بهترین برنامه پیام رسانی
بهترین برنامه پیامرسانی بر اساس توصیههای قبلی برای ایجاد یک تجربه چنددستگاهی یکپارچه برای کاربران، همراه با قابلیتهای بیانی پیشرفتهتر، از جمله:
انتخاب کننده شکلک
از انتخابگر ایموجی حمایت کنید.
ورود ساده شده
با استفاده از CredentialManager با رمز عبور یا ورود به سیستم فدرال، روی هویت یکپارچه در سراسر سطوح سرمایه گذاری کنید.
رمزگذاری انتها به انتها
پروتکلهای رمزگذاری استاندارد صنعتی را پیادهسازی کنید تا مطمئن شوید که پیامها امن هستند و فقط توسط گیرنده مورد نظر قابل خواندن هستند.
محتوای غنی را اضافه و ویرایش کنید
هنگام اشتراکگذاری، محتوای غنی را به پیشنمایش متن اضافه و ویرایش کنید.
همگام سازی بین دستگاه ها
کاربران را قادر می سازد تا به مکالمات خود به طور منسجم در چندین دستگاه دسترسی داشته باشند، و اطمینان حاصل شود که تجربه ارتباطی آنها یکپارچه است، خواه در تلفن، رایانه لوحی یا رایانه خود باشند.
برای ایجاد یک برنامه چت با پایگاه داده بیدرنگ Firebase، به کد لبه مراجعه کنید.
واکنش های پیام
به کاربران اجازه دهید تا به پیامها با شکلک یا گرافیک سفارشی واکنش نشان دهند و روشی سریع و سرگرمکننده برای پاسخگویی بدون تایپ کردن پیام ارائه دهند.
ویرایش و حذف پیام
به کاربران امکان کنترل پیام های خود را پس از ارسال، از جمله ویرایش و حذف در یک بازه زمانی مشخص، بدهید.
اعلان های قابل تنظیم
گزینههای سفارشیسازی دقیق برای اعلانها، از جمله صداها، الگوهای لرزش، و رنگهای LED را بر اساس هر مکالمه یا هر تماس ارائه دهید. بررسی ایجاد یک طرح اعلان سفارشی .
حباب های مکالمه
پشتیبانی از حباب ها برای مکالمات
اهداف سهم مستقیم
اهداف اشتراک گذاری مستقیم را ارائه کنید تا به کاربران خود اجازه دهید مستقیماً با مخاطبین داخل برنامه شما اشتراک گذاری کنند.
صفحه کلید نرم افزار را متحرک کنید
صفحه کلید نرم افزار را برای پولیش بیشتر کنترل و متحرک کنید .
چت صوتی و تصویری
قابلیتهای ارتباط صوتی و تصویری با کیفیت بالا و بیدرنگ. کتابخانه Jetpack Telecom شامل ویژگیهای مفیدی مانند پشتیبانی از خدمات پیشزمینه اختصاصی، مسیریابی صدا، و قابلیتهای متقابل دستگاه بین تلفنها، ساعتها، اتومبیلها و موارد دیگر است، در حالی که فناوریهایی مانند WebRTC میتوانند اتصال همتا به همتا را فراهم کنند.
اپلیکیشن Wear OS
یک برنامه Wear OS بسازید تا به افراد کمک کنید از ساعت هوشمند خود در ارتباط باشند.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2024-10-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-10-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Take your messaging to the next level — basic, better, and best\n\nThis document charts the optimal progression of a messaging app from a likely\nstarting place to best-in-class. It's designed to help you think about scaling\nyour app over time, and what features to implement when. While every media app\nis different, consider these recommendations to achieve a best-in-class app.\n\nBasic messaging app\n-------------------\n\nA basic messaging app provides users with a foundational text-based\ncommunications experience, which may include:\n\n- **Offline message support** \n\n Ensure messages can be queued when offline, with strategies for local caching\n and retry attempts. UI cues such as 'sending...' or 'failed to send' indicators\n help manage user expectations.\n\n - [Save data in a local database using Room](/training/data-storage/room).\n - [Run background tasks using WorkManager](/develop/background-work/background-tasks/persistent/getting-started).\n- **Error handling** \n\n Offer clear, informative feedback for different failure scenarios, like network\n issues or blocked recipients. Include actionable steps or explanations to reduce\n user frustration.\n\n- **Notifications** \n\n Provide notifications when messages are received in the background.\n\n - [Work with the Notification runtime permission](/develop/ui/views/notifications/notification-permission).\n - [Create and manage notification channels](/develop/ui/views/notifications/channels).\n- **Firebase Cloud Messaging (FCM)** \n\n Leverage [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) to notify the app of new\n messages.\n\n- **Spellcheck** \n\n [Implement and access spell checking](/develop/ui/views/touch-and-input/spell-checker-framework#SpellCheckClient) in your app.\n\n- **Accessibility** \n\n [Follow Material Design guidelines to design and develop your app for\n accessibility](/guide/topics/ui/accessibility).\n\n- **Sharing**\n\n - [Use the Android Sharesheet to share data and content with other apps and\n targets](/training/sharing/send#why-to-use-system-sharesheet).\n - [Support receiving](/develop/ui/views/touch-and-input/spell-checker-framework#SpellCheckClient) data and content [from other apps](/training/sharing/receive).\n\nBetter messaging app\n--------------------\n\nA better messaging app gives users more tools to enhance their communication and\nprovide self-expression, including:\n\n- **Emoji** \n\n Support [modern emoji](/develop/ui/views/text-and-emoji/emoji2).\n\n- **Push notifications with Intent** \n\n Use payloads with Firebase Cloud Messaging (FCM) to [direct users to specific\n conversations or sections of the app](/develop/ui/views/notifications/navigation) from the notification. This reduces\n the steps users have to take to reach important content. ()\n\n- **Threaded conversations** \n\n Implement replies to specific messages within group chats to maintain the\n context and flow of conversations. This feature is crucial for keeping group\n communications organized and understandable.\n\n- **Image keyboards, drag and drop, and other rich content** \n\n Receive [rich content](/develop/ui/views/receive-rich-content) such as images, videos, and audio files. The\n API includes support for image keyboards and being a drag-and-drop target\n to make it easy for users to add stickers, animations, and other media to\n their messages. Also, make sure your app works as a [drag-and-drop source](/develop/ui/views/touch-and-input/drag-drop)\n to share content with other apps.\n\n- **Search in conversations** \n\n Enable [full-text search](/develop/ui/views/search/training/search) within conversations so that users can quickly\n find messages, images, links, and files. Support filtering by date, person, or\n type of content for efficient searching.\n\n- **Media and file support** \n\n Integrate seamless support for [sending and receiving images](/training/data-storage/shared/photopicker), videos,\n documents, and other files with inline previews and clear indicators for\n download and upload statuses.\n\n- **Notifications**\n\n - [Wait to show the notification permission](/develop/ui/views/notifications/notification-permission#wait-to-show-prompt) until the user is familiar with your app. Trigger the permission from a user action if possible.\n - Support [notification badges](/develop/ui/views/notifications/badges).\n - Support [direct replies](/develop/ui/views/notifications/build-notification#reply-action) in notifications.\n - Make thoughtful use of [notification channels](/develop/ui/views/notifications/channels), potentially including custom [importance level](/develop/ui/views/notifications/channels#importance) and notification behaviors for notification channels.\n - Support [conversation notifications](/develop/ui/views/notifications/conversations#api-notifications) with [long-lived shortcuts](/develop/ui/views/notifications/conversations#api-shortcuts) so users can add people and group shortcuts to their homescreens.\n- **Advanced Firebase Cloud Messaging (FCM)** \n\n Make use of advanced [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) features such as\n data payloads to minimize latency and expensive server round trips.\n\n- **Read receipts** \n\n Provide the option for users to manage the visibility of read receipts. This\n could be a simple toggle in the settings, allowing users to choose privacy over\n acknowledgment.\n\nBest messaging app\n------------------\n\nThe best messaging app builds on the previous recommendations to create a\nseamless multidevice experience for users, along with more advanced expressive\ncapabilities, including:\n\n- **Emoji picker** \n\n Support the [emoji picker](/develop/ui/views/text-and-emoji/emoji-picker).\n\n- **Simplified login** \n\n Invest in seamless identity across surfaces using [CredentialManager](/training/sign-in/passkeys) with\n either [Passkeys](/training/sign-in/passkeys#about-passkeys) or [federated sign-in](/training/sign-in/credential-manager).\n\n- **End-to-end encryption** \n\n Implement industry-standard encryption protocols to ensure that messages are\n secure and only readable by the intended recipient.\n\n- **Add and edit rich content** \n\n Add and edit [rich content](/training/sharing/send#adding-rich-content-previews) to text previews when sharing.\n\n- **Synchronization across devices** \n\n Enable users to access their conversations cohesively across multiple devices,\n ensuring that their communication experience is seamless, whether they're on\n their phone, tablet, or computer.\n\n Check out the [codelab to create a chat app with Firebase Realtime\n Database](https://firebase.google.com/codelabs/firebase-android).\n- **Message reactions** \n\n Allow users to react to messages with emoji or custom graphics, providing a\n quick and fun way to respond without typing out a message.\n\n- **Message editing and deletion** \n\n Give users control over their messages after sending, including editing and\n deletion within a specified time frame.\n\n- **Customizable notifications** \n\n Offer detailed customization options for notifications, including sounds,\n vibration patterns, and LED colors, on a per-conversation or per-contact basis.\n Check out\n [Create a custom notification layout](/develop/ui/views/notifications/custom-notification).\n\n- **Conversation bubbles** \n\n Support [bubbles for conversations](/develop/ui/views/notifications/bubbles).\n\n- **Direct share targets** \n\n Provide [direct share targets](/training/sharing/direct-share-targets) to allow your users to share directly with\n contacts within your app.\n\n- **Animate the software keyboard** \n\n [Control and animate the software keyboard](/develop/ui/views/layout/sw-keyboard) for extra polish.\n\n- **Voice and video chat** \n\n Incorporate high-quality, real-time voice and video communication capabilities.\n The [Jetpack Telecom Library](https://android-developers.googleblog.com/2023/11/alpha-release-of-telecom-library.html) includes helpful features like dedicated\n foreground service support, audio routing, and cross-device capabilities between\n phones, watches, cars, and more, while technologies like WebRTC can provide\n peer-to-peer connectivity.\n\n- **Wear OS app** \n\n Build a [Wear OS app](/wear/gallery/messaging) to help people stay connected from their smartwatch."]]