查看whatsapp在线状态

Check whatsapp online status

我被要求创建一个移动应用程序来检查所选 whatsapp 联系人的在线状态,并在所选联系人在线时通知用户。我认为这是可能的,因为它已经存在另一个使用相同信息的应用程序并且它至少适用于某些人:

https://play.google.com/store/apps/details?id=com.kiwiio.clonspy

但是我不知道应该查询什么样的软件界面才能获取联系人的whatsapp在线状态。

有什么 WhatsApp API 可以用于此目的吗? Android 还是 IOs?或者两者兼而有之?

根据 WhatsApp 常见问题 answer for iPhone developers

WhatsApp provides two ways for your iPhone app to interact with WhatsApp:

1-)Through a custom URL scheme

2-)Through the iOS Document Interaction API

If your application would like to open a WhatsApp Chat with a specific contact, you can use our custom URL scheme to do so. Opening whatsapp:// followed by one of the following parameters, will open WhatsApp and perform a custom action.

NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?text=Hello%2C%20World!"];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
    [[UIApplication sharedApplication] openURL: whatsappURL];
}

在 WhatsApp 常见问题解答的另一个 answer for Android developers 上,您可以通过 WhatsApp 发送带有 ACTION_SEND 意图的消息。也可以绕过系统选择器,可以设置sendIntent.setPackage("com.whatsapp")。对于自定义 URL 方案:

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:

<a href="whatsapp://send?text=Hello%20World!">Hello, world!</a>

根据给iPhone开发者的回答,当时有两个参数,分别是appsend.转到第一个 link 以查找详细信息。

同时勾选 WhatsAPI library by venomous0x.

飞行模式✈️。收到文本后激活飞行模式阅读它关闭应用程序等待几秒钟然后停用它