Skip to content

Version 3.1.0 does not implement sendEvent #5

Open

Description

@philippeauriach

Hello,

we where told to update the SDK to the latest 3.1.0, and following the instructions here https://docs.adjoe.io/rewarded-solutions/integration/playtime-sdk-for-android/integrate-the-playtime-sdk#add-a-teaser-event we tried to send the EVENT_TEASER_SHOWN as before.

Unfortunately this method is not exposed by the SDK.

Thanks,

Activity

  1. AyoubBenabid commented on Jun 5, 2025

    @AyoubBenabid

    You can patch it like so:

    In your node_modules/react-native-adjoe-sdk/src/Playtime.js

    export default {
      // ...all the functions
    
      sendEvent: function (event, extra = null, params = null, uaChannel = null) {
        var playtimeParams = getPlaytimeParams(params, uaChannel);
        return RNPlaytimeSdk.sendEvent(event, extra, playtimeParams);
      },
      EVENT_TEASER_SHOWN: RNPlaytimeSdk.EVENT_TEASER_SHOWN,
    };

    And if you want the TS types, you can optionally add to node_modules/react-native-adjoe-sdk/src-ts/Playtime.d.ts

    declare namespace _default {
      // ...all the types
    
      function sendEvent(event: number, extra: string | null, params?: PlaytimeParams | null, uaChannel?: string): void;
      let EVENT_TEASER_SHOWN: number;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions