-
Notifications
You must be signed in to change notification settings - Fork 93
Instrumenting Your App with Paco Triggers
Bob Evans edited this page Oct 8, 2013
·
9 revisions
You can trigger a user to respond to an experiment by sending Paco a Broadcast Intent on Android.
This allows inter-app communication for two main uses:
- Conducting User Experience Research by instrumenting the Android app to be studied
- Building additional functionality as separate apps that can trigger Paco experiments
- When the user of your app causes an action which you instrumented to execute, the broadcast call to Paco will execute.
- Paco is listening for these Paco Trigger Broadcast events.
- If there is an running experiment that is listening for the Source Identifier, Paco will create a Notification for that experiment informing the user to respond.
- Add the following helper function to your system.
// @param String sourceIdentifier This uniquely identifies your action and is
// specified in your Paco Experiment as the source action.
private void notifyPaco(String sourceIdentifier) {
Intent i = new Intent("com.pacoapp.paco.action.PACO_TRIGGER");
i.putExtra("sourceIdentifier", sourceIdentifier);
sendBroadcast(i);
}
- Call the helper at the point where you want to trigger Paco.
notifyPaco("myAppEventIDString");
- Go to the Paco admin screen
- Go to 'Administer Experiments/ Create New Experiment'
- For 'Choose Signaling Mechanism', select 'Triggered Signaling'
- For 'Choose Trigger', select 'Paco Trigger'
- For 'Source of Paco Action', enter the unique string you specified in the broadcast call for your event above