Event Filter

The PlotProjects SDK keeps track of everything that happens on the device by recording events. These events can be a notification sent, a location acquired, various data about the device, data about app sessions, among others. By recording these events, we can provide analytics and to our clients regarding the behaviour of our SDK, and insights about their users. These events are stored locally and once a network connection is available, they are sent to our servers where they are safely stored and can only be accessed by the app’s owner.

By using, the Event Filter, you are able to access and filter these events before they are stored locally.

In a few steps you can implement it:

Plot automatically detects whether a service is registered in AndroidManifest.xml that extends from the class EventFilterBroadcastReceiver. Implementations of EventFilterReceiver must implement the method public List<Event> filterEvents(List<Event> events). When the service is defined Plot will send the events to this method before saving them on the mobile device. This allows you to hace access to all events that are being saved by Plot and allows you to filter what data Plot can extract from the device.

//Example implementation for event filter:
public class MyEventFilterReceiver extends EventFilterBroadcastReceiver {
    private static final String LOG_TAG = "MyEventFilterReceiver";

    public List<Event> filterEvents(List<Event> events) {
        Logger.debug(LOG_TAG," %s events are being filtered", events.size());
        return events;

And add this receiver to the manifest:

<receiver android:name=".MyEventFilterReceiver" android:exported="false">
       <action android:name="${applicationId}.plot.FilterEvents" />