Appearance
Activity Management
Learn how to implement and manage various interactive activities in your app using the Upshot.ai Flutter SDK.
What are Tags?
Tags are keywords associated with various things within your app where activities from Upshot.ai could be presented. Every activity can have one or more tags associated with it.
Tags in Upshot.ai are used for the same purpose as they are used in a blogging network. They are used to group their activities on the dashboard to make sure activities are displayed in appropriate places in the app.
Creating Tags in Dashboard
Tags can be created in the Tag Manager section of the dashboard. Please see Dashboard documentation/help sections on how to use tags.
What are Activities?
An activity is a tool that Upshot offers to a publisher to interact with the user. For e.g. Push Notifications, Surveys, Rating requests, Opinion Polls, Ads, In-App Messages, Tutorials etc.
How is an Activity Fetched?
When an application requests for an activity, the SDK shows an activity that matches the request criteria. If multiple activities qualify for the request criteria, one of them is randomly selected. If no activities match the request criteria, an error is returned.
Activity Types
dart
// All activity types
ActivityType Any : -1
ActivityType Survey : 0
ActivityType Rating : 1
ActivityType BannerAd : 2
ActivityType FullScreen Ad : 3
ActivityType Custom Ad : 4
ActivityType Opinion Poll : 5
ActivityType Tutorials : 7
ActivityType InAppMessage : 8
ActivityType Badges : 9
ActivityType Screen Tips : 10
ActivityType Trivia : 11
ActivityType Custom Action : 12
ActivityType Mini Games : 13
How to Request an Activity?
Activities are requested by tag and type. An application can allow all kinds of actions using activity type UpshotActivityType.all or activity type -1.
dart
import 'package:flutter_upshot_plugin/flutter_upshot_plugin.dart';
import 'package:flutter_upshot_plugin/upshotConstants.dart';
// Request activity with all types for a specific tag
FlutterUpshotPlugin.showActivity(ActivityTypes.any, "Tag Name");
// Request specific activity type
FlutterUpshotPlugin.showActivity(ActivityTypes.survey, "onboarding");
Important
- Upshot.ai provides localized actions and for that you need to send localeCode to Upshot.ai as a user profile. Examples of localeCode: en_US, en_AU, etc.
- Upshot.ai Activities are shown in a new window but not application keyWindow. When the activity is dismissed, SDK will remove the Activity window from the application.
Locale Configuration
For localized activities, send the locale code as part of user profile:
dart
// Send activity request with locale code
Map profileAttributes = { UpshotProfileAttributes.localeCode: "en_US" };
FlutterUpshotPlugin.sendUserDetails(profileAttributes);
Activity Targeting
You can target activities based on:
- User Segments - Target specific user groups
- User Actions - Trigger based on events
- Time-based - Show at specific times
- Location-based - Target by user location
- Custom Properties - Target based on user profile data
Best Practices
- Strategic Placement - Show activities at natural breakpoints in user flow
- Frequency Control - Don't overwhelm users with too many activities
- Contextual Relevance - Match activity content to user context
- Performance Consideration - Activities load asynchronously, plan UI accordingly
- Tag Organization - Use descriptive, consistent tag naming conventions
- User Experience - Ensure activities enhance rather than interrupt user experience
Troubleshooting
Common Issues
Activities Not Appearing:
- Check if activities are published in the dashboard
- Verify tag names match exactly
- Ensure user meets targeting criteria
- Check network connectivity
Wrong Activity Type:
- Verify activity type constants are correct
- Check dashboard configuration
- Ensure campaign is active and not expired
Permission Issues:
- Verify notification permissions are granted
- Check if user has opted out of activities
- Ensure SDK is properly initialized