หน้าหลักของ WhatsAppหน้าหลักของ WhatsAppศูนย์ช่วยเหลือ
WHATSAPP WEB
ฟีเจอร์
ดาวน์โหลด
ความปลอดภัย
ศูนย์ช่วยเหลือ

เลือกภาษาของคุณ

  • azərbaycan

  • Afrikaans

  • Bahasa Indonesia

  • Melayu

  • català

  • čeština

  • dansk

  • Deutsch

  • eesti

  • English

  • español

  • français

  • Gaeilge

  • hrvatski

  • italiano

  • Kiswahili

  • latviešu

  • lietuvių

  • magyar

  • Nederlands

  • norsk bokmål

  • o‘zbek

  • Filipino

  • polski

  • Português (Brasil)

  • Português (Portugal)

  • română

  • shqip

  • slovenčina

  • slovenščina

  • suomi

  • svenska

  • Tiếng Việt

  • Türkçe

  • Ελληνικά

  • български

  • қазақ тілі

  • македонски

  • русский

  • српски

  • українська

  • עברית

  • العربية

  • فارسی

  • اردو

  • বাংলা

  • हिन्दी

  • ગુજરાતી

  • ಕನ್ನಡ

  • मराठी

  • ਪੰਜਾਬੀ

  • தமிழ்

  • తెలుగు

  • മലയാളം

  • ไทย

  • 简体中文

  • 繁體中文(台灣)

  • 繁體中文(香港)

  • 日本語

  • 한국어

  • ดาวน์โหลด

  • ฟีเจอร์

  • ความปลอดภัย

  • ศูนย์ช่วยเหลือ

  • ติดต่อเรา

เราจะช่วยคุณได้อย่างไร?

นอกจากนี้คุณยังสามารถเรียกดูหัวข้อด้านล่างนี้เพื่อค้นหาสิ่งที่คุณกำลังมองหา
  1. Android

I'm an Android developer, how can I integrate WhatsApp with my app?

There are two ways to integrate with WhatsApp:

-Through a custom URL scheme
-Through Android's intent system.

Custom URL Scheme

WhatsApp provides a custom URL scheme to interact with WhatsApp:

If you have a website and want to open a WhatsApp chat with a pre-filled message, you can use our custom URL scheme to do so. Opening whatsapp://send?text= followed by the text to send, will open WhatsApp, allow the user to choose a contact, and pre-fill the input field with the specified text.

Here is an example of how to write this on your website:

Hello, world!

Android intent system

Like most social apps on Android, WhatsApp listens to intents to share media and text. Simply create an intent to share text, for example, and WhatsApp will be displayed by the system picker:

Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send."); sendIntent.setType("text/plain"); startActivity(sendIntent);

However, if you prefer to share directly to WhatsApp and bypass the system picker, you can do so by using setPackage in your intent:

sendIntent.setPackage("com.whatsapp");

This would simply be set right before you call startActivity(sendIntent);

Similarly you can use Android's intent system to send media through WhatsApp, once again, using setPackage to restrict the package to WhatsApp if you only want to send to WhatsApp. Check this developer page for more information.

บทความนี้มีประโยชน์หรือไม่
มีไม่มี
เพราะเหตุใดบทความนี้จึงไม่มีประโยชน์
  • บทความนี้ทำให้สับสน
  • บทความนี้ไม่ได้ตอบคำถามของฉัน
  • วิธีแก้ปัญหาไม่ได้ผล
  • ฉันไม่ชอบฟีเจอร์หรือนโยบาย
ขอขอบคุณสำหรับความคิดเห็น
ศูนย์ช่วยเหลือ

WHATSAPP

ฟีเจอร์

ความปลอดภัย

ดาวน์โหลด

WhatsApp Web

ธุรกิจ

ความเป็นส่วนตัว

บริษัท

เกี่ยวกับ

ตำแหน่งงาน

ศูนย์แบรนด์

ติดต่อเรา

บล็อก

เรื่องราวบน WhatsApp

ดาวน์โหลด

Mac/PC

Android

iPhone

ความช่วยเหลือ

ศูนย์ช่วยเหลือ

Twitter

Facebook

ไวรัสโคโรนา

2022 © WhatsApp LLC

ความเป็นส่วนตัวและข้อกำหนด