การผสานรวมด้วยความช่วยเหลือของ AI
ใช้ผู้ช่วยเขียนโค้ด AI เพื่อผสานรวมและกำหนดค่า Pushwoosh Android SDK ในโปรเจกต์ของคุณ โดยการเชื่อมต่อผู้ช่วยของคุณกับเซิร์ฟเวอร์ Context7 MCP จะทำให้สามารถเข้าถึงเอกสารประกอบ SDK, ตัวอย่างโค้ด และเอกสารอ้างอิง API ที่เป็นปัจจุบันได้ ซึ่งจะช่วยให้สามารถสร้างโค้ดการผสานรวมที่ถูกต้องและใช้งานได้
วิธีการทำงาน
Anchor link toContext7 คือเซิร์ฟเวอร์ MCP ที่ให้เอกสารประกอบไลบรารีที่เป็นปัจจุบันแก่ผู้ช่วย AI เมื่อผู้ช่วยของคุณเข้าถึง Context7 ได้ จะสามารถดึงข้อมูลเอกสาร Pushwoosh Android SDK, ตัวอย่างโค้ด และเอกสารอ้างอิง API ล่าสุดได้โดยตรงระหว่างการสนทนา แทนที่จะต้องพึ่งพาข้อมูลการฝึกอบรมที่อาจล้าสมัย
ID ไลบรารี Pushwoosh Android SDK บน Context7: /pushwoosh/pushwoosh-android-sdk
การตั้งค่า Context7
Anchor link toเพิ่ม Context7 ไปยังการกำหนดค่า MCP ของผู้ช่วย AI ของคุณ:
รันคำสั่งต่อไปนี้:
claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEYเพิ่มไปยังไฟล์กำหนดค่า MCP ของคุณ (.cursor/mcp.json หรือไฟล์ที่เทียบเท่า):
{ "mcpServers": { "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"] } }}ตัวอย่างคำสั่ง
Anchor link toเมื่อกำหนดค่า Context7 แล้ว คุณสามารถใช้คำสั่งภาษาธรรมชาติเพื่อผสานรวม SDK ได้ ด้านล่างนี้คือตัวอย่างคำสั่งที่พร้อมใช้งานสำหรับงานทั่วไป
การผสานรวม SDK พื้นฐาน
Anchor link toIntegrate Pushwoosh Android SDK into my Android project with Firebase Cloud Messaging (FCM).
Requirements:- Add gradle dependencies (pushwoosh, pushwoosh-firebase)- Configure AndroidManifest.xml with Pushwoosh App ID: YOUR_APP_ID- Register for push notifications in MainActivity
Use Context7 MCP to fetch Pushwoosh Android SDK documentation.การจัดการการแจ้งเตือนแบบพุช
Anchor link toShow me how to handle push notification callbacks (receive, open) withPushwoosh SDK in Android. I want to add analytics tracking for these events.
Use Context7 MCP to fetch Pushwoosh Android SDK documentation for NotificationServiceExtension.การแบ่งกลุ่มผู้ใช้ด้วยแท็ก
Anchor link toShow me how to use Pushwoosh tags for user segmentation in Android.Create example helper class with methods for setting and getting tags.
Use Context7 MCP to fetch Pushwoosh Android SDK documentation for setTags and getTags.สิ่งที่ผู้ช่วย AI ได้รับ
Anchor link toเมื่อผู้ช่วยของคุณสอบถาม Context7 เกี่ยวกับ Pushwoosh Android SDK จะได้รับข้อมูลดังนี้:
- คำแนะนำในการติดตั้ง — การตั้งค่า dependencies ของ Gradle และ manifest
- เอกสารอ้างอิง API — คลาสสาธารณะ, เมธอด และอินเทอร์เฟซ
- ตัวอย่างโค้ด — ตัวอย่างโค้ด Java และ Kotlin สำหรับกรณีการใช้งานทั่วไป
- เอกสารประกอบโมดูล — คู่มือสำหรับแต่ละโมดูลของ SDK (Firebase, Huawei, Geozones, ฯลฯ)
- รายละเอียดการกำหนดค่า — การตั้งค่า AndroidManifest.xml, การตั้งค่า Firebase และสิทธิ์การเข้าถึง