I’m trying to implement an app that will use two features of the mixpanel:
- Track activity and analytics
- Work with push notifications (creating/tracking)
For first task I’m using [angular-mixpanel][1] module and it works perfectly. But I cant use the same module for the second task because this module has no methods needed for push notifications. First I want connect push notifications for Android. [Mixpanel guide for Android][2] contains sample of code to handle registration:
public void registerPush(GoogleCloudMessaging gcm){ String registrationId = gcm.register("YOUR_SENDER_ID"); MixpanelAPI.People people = mMixpanel.getPeople(); people.identify("USER_DISTINCT_ID"); people.setPushRegistrationId(registrationId); } I found only two plugins which can regiser token for push notifications (`people.setPushRegistrationId()`): - [cordova-mixpanel][3] this one looks good but lacks Android support. - [cordova-mixpanel-plugin][4] this plugin has the method `window.mixpanel.people.setPushId()` but I it doesn't works. I tried send push notifications to my device using mixpanel account, but I get no any result. I'm sure what I used correctly all data (Google Cloud Messaging token, mixpanel app token and etc.) because tracking activity works correctly and I see data in the mixpanel. I think my device can't register in the mixpanel for notifications. I don't know how I can check it. What do you think about it? Has someone solved the similar problem? I will be glad of any information. If you have something you'd like to share, please send me an email at martynov.max.dunice@gmail.com Thanks in advance! Max [1]: https://github.com/kuhnza/angular-mixpanel [2]: https://mixpanel.com/help/reference/android-push-notifications [3]: https://github.com/poetic/cordova-mixpanel [4]: https://github.com/samzilverberg/cordova-mixpanel-plugin