Android SDK Documentation – PRE-REQUISITES
- Use Android Studio 3.2 or later
- minSdkVersion 16 or later
- compileSdkVersion 28 or later
Recommended: Create a Doceree publisher account and register your app.
This is a one time, 4-step process. Once your Mobile App is integrated, you can add any number of ad slots at any point of time. For adding each app, redo the same process. There is no limit to the number of apps that you may add
It’s not mandatory to complete the entire process in one go. All the information that you enter gets saved when you move to the next step
To start the integration process, please log in to your account and click on the ‘Add Platform’ tab on the left Navigation Bar and click on Mobile App
STEP 1 – Basics
Enter the basic identification information about your Mobile App
- App Name: Enter the name of the Mobile App
- App Link: Enter the link to your app
- App Type: Enter the type of app you are registering
- App Category: Select the best option from the dropdown list
- Market: Choose the market from where the majority of your app users come
- App Description: Enter a basic description of the app, how would you like to describe your Mobile App
The information you enter here will be used on the Dashboard. So, be careful that you enter information that is easy to understand and identifies each Mobile App uniquely (in case you are managing many Mobile Apps from a single account)
STEP 2- Platform integration
3.1 Setting up the API Keys
- To request test ads use the test API key. Add your Doceree Application_ID as shown below to app’s AndroidManifest.xml file by adding a <meta-data> tag with name com.doceree.androidadslibrary.ads.APPLICATION_ID
- After App publication Use the live API key. Add your Doceree Application_ID as shown below to app’s AndroidManifest.xml file by adding a <meta-data> tag with name
com.doceree.androidadslibrary.ads.APPLICATION_ID
3.2 Import Software Development Kit (SDK)
- Add the JitPack repository: Copy and paste the code generated here in the root build.gradle at the end of repositories
- 2 Open the app-level build.gradle file for your app: Copy and paste the snippet in the box. This helps in pulling the Doceree Ads SDK. You need to complete it by doing a gradle Sync
3.3 Initializing DOCEREE Ads SDK
Refer to the example given on the screen – copy and paste the code generated and call the initialize() method in your application
Status: You have the option to add the platform code at this occasion or pick the option of adding the code at a later time/date
STEP 3 – AUDIENCE VERIFICATION
This step helps us in verifying if the user is a physician, so that the Ad server can select the ads that are best suited for the user. We call this precision-targeting
This step has 2 sub-parts
- On your app, you need to call the DocereeMobileAds.getInstance().loginWith(hcp)) given in the box below (an example) function with the user details (similar to the one that is generated on the screen)
public class DashBoardActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_advert_options);
...
doHcpLogin();
...
}
private void doHcpLogin() {
Hcp hcp = new Hcp.HcpBuilder()
.setFirstName("John")
.setLastName("Doe")
.setSpecialization("Anesthesiology")
.setCity("Los Angeles")
.setZipCode("90001")
.setGender("Male")
.setNpi("123456789")
.setEmail('john.doe@example.com') // not mandatory
.setMobile('9999999999') // not mandatory
.build();
DocereeMobileAds.getInstance().loginWith(hcp);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.advert_options, menu);
return true;
}
} -
If the professional logs out of the app or gets unauthenticated because of some reason, you need to call the clearUserData() method (similar to the one that is generated on your screen)]
Comments
0 comments
Please sign in to leave a comment.