Publish FAQs
Who manages the content publishing job?
The app developer manages the content publishing job and sends requests to the Engage Service. In this way, developer partners have more control over when and how to publish content to the users. This avoids waking up the partner app too frequently to publish content.
Does a developer need to publish all cluster types?
While technically developers are free to publish just one cluster, we strongly advise including more. Otherwise, developers miss the opportunity to drive better engagement with their content. We highly recommend publishing all cluster types for each vertical.
How often should the developer partner be publishing data via the work manager while the app is running?
This is to be decided by the developer partner. Google recommends publishing once or twice per day for general recommendation content, and to use an event-driven methodology for shopping cart, reorder, and other continuation content (for example, start the worker as a callback of the user adding items to the cart or the user stopping a movie halfway).
Broadcast Intent FAQs
Why do Android app developers need to register for broadcast intents?
In order to serve fresh content to the user, you should use broadcast intents to trigger a data sync in cases where users might not use the app frequently.
Background execution not allowed
While registering the broadcast intent, you may come across the following error:
Background execution not allowed: receiving Intent
{ act=com.google.android.play.engage.action.PUBLISH_RECOMMENDATION .. }
You need to register the broadcast receivers dynamically.
class AppEngageBroadcastReceiver extends BroadcastReceiver {
// Trigger recommendation cluster publish when PUBLISH_RECOMMENDATION broadcast
// is received
}
public static void registerBroadcastReceivers(Context context) {
context = context.getApplicationContext();
// Register Recommendation Cluster Publish Intent
context.registerReceiver(new AppEngageBroadcastReceiver(),
new IntentFilter(com.google.android.play.engage.service.Intents.ACTION_PUBLISH_RECOMMENDATION));
...
}
Workflow FAQs
Remote repository cannot be found
While integrating with the SDK, you may come across the following error:
An error occurs when using a remote dependency: the remote repository cannot be found.
The SDK is currently in an early access mode, hence it's not published to google() yet.
We're working on launching this publicly and will let you know when it's available.
When it's available on maven.google.com, just adding the reference com.google.android.play:engage
directly would work.
For now, you will have to include the aar file locally.
Class cannot be found
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/collect/ImmutableList;
In the build.gradle file, you need to include -
implementation 'com.google.guava:guava:30.1.1-android'
Adding the above dependency will fix the issue. As the Engage SDK is still in an early access mode, the downloaded aar file as well as the dependencies has to be included explicitly else you will face these errors. We're actively working on publishing the SDK to maven and will let you know when it's available. Once it is published on maven, just adding the dependency to "com.google.android.play:engage" would work.
Testing Deeplinks
The deep-links are associated with the package name. A good way to test deep-links is using the adb tool.
adb shell am start -W -a android.intent.action.VIEW -d <DEEPLINK URI> <PACKAGE NAME>