Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Callback or addEventListener("cutomActivity", function(){}); not working for customActivity #169

Open
Niral2110 opened this issue Sep 22, 2017 · 0 comments

Comments

@Niral2110
Copy link

I am using module 1.8.4 with SDK 6.1.1.GA
Here I am facing an issue with customActivity callback.
Even I am not able to get "customActivity" event fired on tap of customButton.
Code being used is as following.

var downloadButton = {
    title: "Download",
    type: "Download",
    image: "images/download.png",
    callback: function() {
       console.log("This is a customActivity to download report ");
    }
};
customButtons.push(downloadButton);

Social.addEventListener("complete", function(e) {
    Alloy.Globals.eventListenerAdded = true;
    console.log("complete: ");
    console.log(e);
    if (e.platform == "activityView" || e.platform == "activityPopover") {
        switch (e.activity) {
            case Social.ACTIVITY_TWITTER:
                console.log("User is shared on Twitter");
                break;
            case Social.ACTIVITY_CUSTOM:
                console.log("This is a customActivity: " + e.activityName);
                break;
        }
    }
});
Social.addEventListener("customActivity", function(e) {
    console.log("customActivity:");
    console.log(e);
});

not able to get response in any of the above catches for customActivity.
Is there anything I am doing wrong ?

@Niral2110 Niral2110 changed the title Callback or addEventListener("cutomActivity", function(){}); not working for cutomActivity Callback or addEventListener("cutomActivity", function(){}); not working for customActivity Sep 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant