Amplify Crash Analytics - Diagnostic Information

Developers can use the Amplify Crash Analytics (ACA) API to capture additional information that might be useful to diagnose a crash. For example, device information can be obtained using Titanium APIs and set as additional data that will be sent with the crash event.  The device information can be set either using the setMetadata method or as a breadcrumb. 

The following code sample demonstrates how to gather device information and attach it to the crash event:

  • device orientation
  • device model
  • network info
  • device available and total memory
  • location
aca.setMetadata('device', {
    orientation: Ti.Gesture.portrait ? 'portrait' : 'landscape',
    model: Ti.Platform.model,
    network_type: Ti.Network.networkTypeName,
    available_memory: Ti.Platform.availableMemory,
    total_memory: Ti.Platform.totalMemory,
    location: Ti.Geolocation.lastGeolocation

These data points can then be accessed through Query Builder by accessing the data.meta.device.<property>:

obtaining device model

Related Links