Getting Notified of Leads

Checking Transaction History

Your application can be notified of when a user completes an offer in one of two ways: by receiving postback notifications to a server you use to track your user activity, or by calling a function within the SDK which will call our server and retrieve the latest updates as to which offers have been completed.

To check for completed offers using the function you can call within the app follow the instructions below.

You can get the list of your user's newly completed offers from within the SDK by calling the AdscendMediaWrapper.getCompletedTransactions method from your application. Following is the sample code for this :

String publisherId = "32740";
String adwallId = "2074";
String subId1 = "demo_subid1";

CompletedOfferRequestListener listener = new CompletedOfferRequestListener() {

           @Override
           public void onSuccess(ArrayList> completedOffers) {

               if (completedOffers != null) {
                   for (Map offer : completedOffers) {
                       Iterator it = offer.entrySet().iterator();
                          //Iterate each offer object with saved offer.
                         //If any offer matches with saved offer then that offer has bee removed from local storage
                   }
               }
           }

           @Override
           public void onFailure(Object message) {

           }
       };

AdscendMediaWrapper.getCompletedTransactions(getApplicationContext(), pubId, adwallId, subId1, listener);

The completedOffers array will have the list of offers marked as completed by your user on our servers. It is a list of dictionaries with each dictionary having following format:


{
    OfferName : “Test Offer”,
    CurrencyAdjustment : “0.25”,
    TransactionID = “123456”
}

You can call this method on application launch or periodically depending upon your needs and do the necessary processing for the completed offers, such as awarding your user. All the completed offers will be removed from the list of clicked offers after the completion of this method.