image_sending_limitations.md 2.11 KB

WeChat Image Sending Limitations & Workarounds

Problem

WeChat does NOT expose a direct API for sending images programmatically. The only supported way via MCP tools is mcp_android_phone_send_wechat_message which only handles text.

What We Tried

1. Android Intent Sharing (am start -a SEND)

  • Opens WeChat's ShareImgUI activity
  • Result: Opens a contact picker UI, requires manual selection
  • Status: Partially works, but not fully automated
am start -a android.intent.action.SEND -t image/png \
  --eu android.intent.extra.STREAM file:///sdcard/Pictures/WeChat/daily_digest.png \
  -n com.tencent.mm/.ui.tools.ShareImgUI

2. UI Automation (Click "+" → Album → Select Image → Send)

  • Result: Unreliable - button coordinates vary by device/screen size
  • Status: Failed - cannot consistently locate the "+" button or album icon

3. FileProvider / ContentProvider

  • Result: Would require WeChat-specific permissions
  • Status: Not feasible without modifying WeChat's manifest

4. Frida Hooking

  • Result: Requires Mac bridge (frida_bridge.py) not available in Termux
  • Status: Not feasible in current environment

Current Workaround

  1. Generate image with Pillow → save to /sdcard/Pictures/WeChat/
  2. Send text summary via mcp_android_phone_send_wechat_message
  3. User manually sends image from gallery if needed

Future Solutions

Option A: phoneuse Script

Build a dedicated phoneuse script that:

  1. Opens specific chat via am start with chatroom ID
  2. Uses accessibility service to find and click "+" button
  3. Navigates to album
  4. Selects image by filename
  5. Clicks send

Option B: WeChat Web Hook

If user has WeChat PC client running, could use:

  • Windows COM automation
  • Or a third-party WeChat bot framework (risky, may violate ToS)

Option C: Alternative Delivery

  • Upload image to temporary hosting (imgur, etc.)
  • Send link to group
  • Or send as email attachment

Recommendation

For now, use the text summary + manual image approach. The text summary captures all key information; the image is a nice-to-have visual enhancement.