sPFFramework/src/main/java/it/polimi/spf/framework/notification/SPFNotificationManager.java
public long saveTrigger(SPFTrigger trigger, String appPackageName) {
        trigger = mTriggerTable.saveTrigger(trigger, appPackageName);
        if (trigger != null) {
            if (mHandler != null)
                mHandler.postAddTrigger(trigger);
            return trigger.getId();
        } else {
            return -1;
        }
    }
public long saveTrigger(SPFTrigger trigger, String appPackageName) {
        trigger = mTriggerTable.saveTrigger(trigger, appPackageName);
        if (trigger != null) {
            if (mHandler != null)
                mHandler.postAddTrigger(trigger);
            return trigger.getId();
        } else {
            return -1;
        }
    }
Saves the trigger on the database.

@param t