Please refer to the sample included in the SDK before applying to your app. - M app / L app |
"M app" indicates the publisher app with the sign-in feature feature.
"L app" indicates the new lockscreen-exclusive application hereinafter.
"M app" indicates the publisher app with the sign-in feature feature.
"L app" indicates the new lockscreen-exclusive application hereinafter.
An extension SDK that helps you to work with the BuzzScreen SDK which shows personalized content and ads on your Android lockscreen.
You need user information to use the personalization feature in BuzzScreen, and you need to pass user information to the M app in one of two ways:
Implement sign-in feature for lockscreen-exclusive applications - refer to BuzzScreen SDK Basic Usage .
If you can't implement sign-in feature for lockscreen-exclusive application, integrate BuzzScreen Extension SDK to use your existing user information of publisher app - see the current guide
Unless you are new to BuzzScreen SDK, that is, if you have already integrated BuzzScreen SDK in your publisher app, please refer to BuzzScreen Migration SDK Usage . |
Necessary SDK’s to integrate
M app: BuzzScreenHost SDK
L app: BuzzScreenClient SDK + BuzzScreen SDK
Content | Detail | |
---|---|---|
1 | Android version | Requires 4.0.3 (API level 15) or newer. |
2 | APK signature | As M app and L app sync data via BuzzScreenHost SDK and BuzzScreenClient SDK, the two APKs should be signed with an identical signature to block access from other apps. Using protectionLevel="signature" is recommended. |
3 | Buzzvil’s Check | Apk files of both M app and L app fully integrated following the guide should be passed on to Buzzvil BD team so they can be reviewed BEFORE uploading on the market. |
Before initiating the integration process, consultation with Buzzvil BD Team in advance is mandatory. |
BuzzScreenHost
, which is integrated in the M app, provides user information necessary to activate the lockscreen of the L app.
If you can not provide the required information from the M app, the lockscreen in L app can not be activated.
The L app should check the status of the M app at runtime to determine if the lockscreen of the L app can be activated.
When the M app is uninstalled, the lockscreen in the L app is automatically deactivated. All other lockscreen management responsibilities are entirely in the L app.
build.gradle
Add manifestPlaceholders
.
android { defaultConfig { // Please replace my_app_key with the app key provided for BuzzScreen integration process. manifestPlaceholders = [buzzScreenAppKey:"my_app_key"] } } ... repositories { maven { url "https://dl.buzzvil.com/public/maven" } } ... dependencies { // Extension library for M app. Please take extra caution of the library name as it is different for L app. implementation 'com.buzzvil.buzzscreen.ext:buzzscreen-host:1.4.0' // (optional) Library for encryption provided by Extension SDK // implementation 'com.github.joshjdevl.libsodiumjni:libsodium-jni-aar:1.0.8' } |
Content | Method | Place | Detail |
---|---|---|---|
Initialization code of M app for |
| Call in Application class. | Parameters
|
public class App extends Application { @Override public void onCreate() { super.onCreate(); // Initialization for BuzzScreenHost // example code uses com.buzzvil.buzzscreen.sample_client for L app package name. BuzzScreenHost.init(this, "com.buzzvil.buzzscreen.sample_client"); Example of registering listener called when Buzzscreen is activated in L app, deactivating that of M app // Optional // Example of registering listener called when Buzzscreen is activated/deactivated in L app, or user information of L app is changed BuzzScreenHost.setClientEventListener(new BuzzScreenHost.ClientEventListener() { @Override public void onActivated() { // called when Buzzscreen is activated in L app Log.i("MainApp", "ClientEventListener - onActivated"); } @Override public void onDeactivated() { // called when Buzzscreen is deactivated in L app Log.i("MainApp", "ClientEventListener - onDeactivated"); } @Override public void onUserProfileUpdated(UserProfile userProfile) { // called when user information of L app is changed Log.i("MainApp", "ClientEventListener - onUserProfileUpdated"); } }); } } |
If you already have user information for gender and age, use the methods as above. If you do not have those user information, you can also set user info in L app. Note that if you do not set age and gender information, ads with targeted info will not be allocated, which will reduce the total number of ads users can see. |
Content | Method | Place | Detail |
---|---|---|---|
Class for setting user profile |
| Should be set before activating L app lockscreen | You can get |
Set User Id |
|
If the user ID is not set, the L app determines that the user is not signed in from the M app and you will get a | |
User Age |
| Set age by Year of Birth of the user in 4 digits (e.g, 1988) | |
User Gender |
| Set gender by using predefined string constants below:
| |
User info Synchronization |
| Synchronize the user information with L app.
|
BuzzScreenHost.getUserProfile() .setUserId(newUserId) .setBirthYear(newBirthYear) .setGender(newGender) .sync(encrypt); |
Content | Method | Detail | |
---|---|---|---|
Sign out |
| Call
| |
Launch L app |
| Launch the L app.
| |
Check if L app lockscreen is activated |
| Returns | |
Activate L app lockscreen |
| Activates lockscreen in L app. When activating lockscreen, user info set in the M app will be used. Parameters
| |
Deactivate L app lockscreen |
| Deactivates lockscreen in L app. |
BuzzScreen SDK must be integrated to use the personalization feature in BuzzScreen. This guide explains the integration of BuzzScreenClient
and BuzzScreen SDK at the same time for your understanding. If you only want to see the BuzzScreen SDK integration separately, see BuzzScreen SDK Basic Usage doc.
BuzzScreen SDK must be integrated to use the personalization feature in BuzzScreen. This guide explains the integration of BuzzScreenClient
and BuzzScreen SDK at the same time for your understanding. If you only want to see the BuzzScreen SDK integration separately, see BuzzScreen SDK Basic Usage doc.
Below are the key values necessary for the integration:
app_key
: Please find the app_key on your BuzzScreen dashboard. Please ask your account manager if the account details are not provided yet. (Required in the build.gradle
and BuzzScreen.init
method)
app_license
: Please ask your account manager. (Required in the AndroidManifest.xml
setting)
plist
: Please ask your account manager. (Required in the AndroidManifest.xml
setting)
It is required to submit the integrated APK file to your account manager for review before going live.
The following API server should be prepared for the service of lockscreen application.
Reward API: Publisher API server that will actually process the request and provide rewards for the user. For more information, please refer to Reward Accumulation Postback API doc.
Content | Detail | |
---|---|---|
1 | Setting User Profile | If you set up user targeting information such as gender and age in |
2 | Activation / Deactivation |
|
Content | Detail | ||
---|---|---|---|
1 | Android version | Requires 4.0.3 (API level 15) or newer. | |
2 | Match Google Play Services version no. | Please change the version number in Google Play Services libraries below to match the version number of Google Play Services in your app.
| |
3 | If app’s support library version is 26 or higher | You need to upgrade play service version to 12 or higher due to the instability of GCM(Google Cloud Messaging) Latest 15.0.1 version is recommended. Latest 15.0.1 version is recommended. |
build.gradle
inside your module.android { defaultConfig { // Please replace my_app_key with the app key given for BuzzScreen integration process manifestPlaceholders = [buzzScreenAppKey:"my_app_key"] } } ... repositories { maven { url "https://dl.buzzvil.com/public/maven" } } |
dependencies { implementation 'com.google.android.gms:play-services-base:16.0.1' implementation 'com.google.android.gms:play-services-ads:15.0.1' implementation 'com.google.android.gms:play-services-location:16.0.0' // BuzzScreenClient library for L app. The version MUST be same as BuzzScreenHost's implementation 'com.buzzvil.buzzscreen.ext:buzzscreen-client:1.4.0' { exclude group: 'com.buzzvil', module: 'buzzscreen' } // (optional) Library for encryption provided by Extension SDK // implementation 'com.github.joshjdevl.libsodiumjni:libsodium-jni-aar:1.0.8' } |
AndroidManifest.xml
<manifest> <application> ... <!-- Configuration for BuzzScreen--> <!-- app_license meta-data is unnecessary for BuzzScreen SDK version 1.9.5.6 or higher --> <meta-data android:name="app_license" android:value="<app_license>" /> <!-- plist meta-data is unnecessary for BuzzScreen SDK version 1.9.0.7 or higher --> <meta-data android:name="com.buzzvil.locker.mediation.baidu.plist" android:value="<plist>" /> </application> </manifest> |
Please ask your account manager for <app_license>
and <plist>
. But, these are unnecessary for BuzzScreen SDK version 1.9.5.6 or higher
Please ask your account manager for <app_license>
and <plist>
. But, these are unnecessary for BuzzScreen SDK version 1.9.5.6 or higher
In order to integrate BuzzScreen into Android apps, please follow the 3 steps below: 1) Initialization → 2) Set User Profile → 3) Turn on/off the lockscreen
Also, please initialize BuzzScreenClient
together in step 1) to synchronize user information with M app.
init()
and launch()
Content | Method & Place | Detail | ||
---|---|---|---|---|
Initializing BuzzScreen |
| Parameters
| ||
Initialization code of |
| Parameters
| ||
Listener for deactivation request from M app |
| Parameters
| ||
Launch BuzzScreen |
|
|
|
If you do not set User information of gender and age in the BuzzScreenHost
of M app, you can set targeting information here.
If M app has set all age and gender information, skip this section. |
If you do not set age and gender information anywhere in M app or L app, ads with targeted will not be allocated, which will reduce the total number of ads users can see. |
Content | Method | Detail | |
---|---|---|---|
Object for setting user profile information |
| You can set user profile information in this Class.
| |
User Age |
| Set age by Year of Birth of the user in 4 digits (e.g. 1988) | |
User Gender |
| Set gender by using predefined string constants below:
| |
User Profile Synchronization |
| Use this method when you need to pass a changed
|
// get UserProfile from BuzzScreen UserProfile userProfile = BuzzScreen.getInstance().getUserProfile(); // Update BuzzScreen UserProfile userProfile.setBirthYear(newBirthYear); userProfile.setGender(newGender); // Optional : use this method when you need to pass a changed UserProfile to BuzzScreenHost. BuzzScreenClient.requestUserProfileSync(encrypt); |
Lockscreen activation on L app works as follows: Information transfer from M app → BuzzScreen Activation.
To get data transferred from M app, BuzzScreenClient
provides the following function.
Content | Method & Place | Detail |
---|---|---|
Obtaining user info from M app |
| This method is used to obtain data needed for BuzzScreen activation from M app asynchronously. Parameters
|
Activating BuzzScreen |
| Turn on BuzzScreen.
|
Deactivating BuzzScreen |
| Turn off BuzzScreen. |
|
checkAvailability
and activation flow from L appFor more information on lockscreen activation, refer to this page. |
When a reward accumulation event occurs from a user, BuzzScreen does not handle this in the client side. Instead the BuzzScreen server will make a reward accumulation request to the publisher's server and the publisher's server should process the request and provide rewards for the user.
Regarding implementing the postback, please refer to Reward Accumulation Postback API doc.
If you would like to send the user a push notification on point accumulation, it should be processed/sent from your server after receiving a reward accumulation request from BuzzScreen.
If you would like to send the user a push notification on point accumulation, it should be processed/sent from your server after receiving a reward accumulation request from BuzzScreen.
If you need any of the following features, please refer to Advanced Usage :
Customized lockscreen, slider UI, clock UI, or extra lockscreen widgets.
Separating the lockscreen process from main process for efficient memory usage.
To enable customized targeting features, please refer to Custom Targeting.
To customize lockscreen service notification, please refer to Lockscreen Service Notification.
Once you have integrated each SDK to M app and L app, you can sync the user information set in the M app with L app and use it in L app's BuzzScreen.
This extension helps the user information of M app to be used in L app. Actual lockscreen is driven by BuzzScreen SDK which is separate SDK from this extension. If you would like to see the BuzzScreen SDK guide separately, see BuzzScreen SDK Basic Usage.
This extension helps the user information of M app to be used in L app. Actual lockscreen is driven by BuzzScreen SDK which is separate SDK from this extension. If you would like to see the BuzzScreen SDK guide separately, see BuzzScreen SDK Basic Usage.
You can try the sample app through the following steps.
Clone or download the entire project from GitHub. Unzip it.
Import unzipped directory from Android Studio 3 or more (File>New>Import Project)
Replace android: value = "<app_license>"
, android: value = "<plist>"
in AndroidManifest.xml
for each module. If you want to build only the sample apps without values, you can empty the value as ""
. Re-sync Gradle project.
Now you can select and build the modules.