0

I am integrating Apptentive on Android. I am passing custom data to the Message Center but it is not display on the Apptentive website. This is my code

HashMap<String, String> customData = new HashMap<String, String>();

//add package name
customData.put("package", getPackageName()); 

//show message center
Apptentive.showMessageCenter(ViralPopup.this, customData);

Any suggestions?

amit
  • 1,373
  • 2
  • 16
  • 29

2 Answers2

1

Custom Data sent in this manner is attached to the message that the user sends. If they don't send a message, then you won't see the custom data show up. If you do send a message, look at the actual message you receive in the conversation view on the server. The custom data should be visible on the message itself.

To view the custom data, you simply mouse over the message, and click "Show Custom Data".

enter image description here

Sky Kelsey
  • 19,192
  • 5
  • 36
  • 77
  • I am testing this on my device and the custom data is not appearing in the message on the website. I am looking at the 'Custom Device Data' and 'Custom Person Data' sections. – amit Jun 24 '14 at 20:36
  • The custom data is attached to the message. This method is intended for sending data that is associated with a message. There are other methods for sending custom data attached to the person or the device. Check out http://www.apptentive.com/docs/android/api/com/apptentive/android/sdk/Apptentive.html#addCustomDeviceData%28android.content.Context,%20java.lang.String,%20java.lang.String%29 – Sky Kelsey Jun 24 '14 at 20:47
  • 1
    Thanks for the picture. That help me locate the custom data. – amit Jun 25 '14 at 19:42
1

You are adding custom message data, which will only be sent alongside a successful Apptentive message.

You may want to instead add custom person or device data, which will be automatically added to that person's events in your dashboard:

Apptentive.addCustomPersonData(context, "city", "Seattle");

Apptentive.addCustomDeviceData(context, "color", "red");

Custom Data docs:
http://www.apptentive.com/docs/android/features/#custom-data

pkamb
  • 33,281
  • 23
  • 160
  • 191