0

我想知道是否有办法从我开发的安卓应用程序向设备发送推送通知。此外,如果有可能开发我的 php 服务器,它会请求将推送通知发送到特定设备。我已经用我的应用程序测试了 SDK,如果我从 mixpanel.com 发送它,它会收到通知。为了方便起见,我只是想让事情自动化。

我正在尝试实现具有消息传递功能的应用程序,并且需要通知将在收到消息时收到消息的用户。我阅读了很多关于 GCM 的内容,但那里似乎没有任何好的文档,而且无论如何都无法正常工作,而且我总是会出错。Mixpanel 应该可以完成这项工作,但为了让我能够发送推送通知,我必须登录到他们的网站并使用该网站发送通知。我还尝试使用 HTTP 请求并向发送推送通知的 URL 发送请求,但我需要登录,但它不起作用。

任何帮助将不胜感激,因为我必须尽快完成此应用程序!

谢谢

4

1 回答 1

0

You can get Mixpanel to send your push notifications automatically using the "Notifications" feature- you don't have to log in to Mixpanel every time. You can set up the notifications to be sent based on a user's properties. If you want to send a notification based on some event in your app, you can send a people analytics update to Mixpanel when that event occurs.

So suppose you want people to receive a push notification to their mobile device every time they sign up in your web app. On the "Thanks for signing up" page of your app, you'd put something like the following:

// Assuming you've added the Mixpanel JS snippet to your page
mixpanel.identify(SOME USER DISTINCT ID);
mixpanel.people.set("Signed Up", true);

Then, you could set up a notification in Mixpanel with "Signed Up Is True" in your Mixpanel project. The next time you set a user to "Signed Up", they'll get a GCM notification.

于 2013-06-25T20:42:31.227 回答