Offerwall SDK
Dashboard
1.0.7
1.0.7
  • 👋Welcome to PubScale Offerwall SDK
  • Prerequisites
    • 📪Prerequisites
    • 🧙PubScale Onboarding
  • Native Android
    • ⬇️Setting up the SDK
    • 🔌Initialize the SDK
    • 🎬Start the OfferWall
  • React Native
    • ⬇️Setting up the SDK
    • 🔌Initialize the SDK
    • 🎬Start the OfferWall
  • Flutter
    • ⬇️Adding the dependencies
    • 🔌Launch the offerwall
  • Unity
    • ✅Preintegration Checks
    • ⬇️Setting up the SDK
    • 🔌Integration
  • Web (Beta)
    • ⬇️IFrame integration
    • ⬇️Direct Link
  • S2S Callback Configuration
    • 🦉S2S Callback Configuration
    • 🗝️IP Whitelist
  • Sandbox Environment
    • 🩺Sandbox Environment
  • 🔮Samples
Powered by GitBook
On this page
  1. Flutter

Launch the offerwall

Add the below code into the widget where you want to launch the offerwall from

void launchOfferwall(String appId, String userId) async{
  await launchUrlInCustomTabs(
    Uri.parse("https://wow.pubscale.com/?app_id=${appId}&user_id=${userId}"),
  );
}

Future<void> launchUrlInCustomTabs(Uri uri) async {
  final theme = Theme.of(context);
  try {
    await launchUrl(
      uri,
      options: LaunchOptions(
        barColor: theme.colorScheme.surface,
        onBarColor: theme.colorScheme.onSurface,
        barFixingEnabled: false,
      ),
    );
  } catch (e) {
      // If the URL launch fails, an exception will be thrown. (For example, if no browser app is installed on the Android device.)
    debugPrint(e.toString());
  }
}

Launching the Offerwall

To launch the offerwall, simply call the launchOfferwall() method with the pubscale app id and your app's user id as the parameters.

launchOfferwall("OFFERWALL_APP_ID", "USER_ID");
PreviousAdding the dependenciesNextPreintegration Checks

Last updated 10 months ago

🔌