User profile

If you know the user's gender and/or birthday, you can share them with us so that we can suggest better matching apps to the user.

// set the gender
AdjoeGender gender;
switch(getUserGender()) {
    case "male":
        gender = AdjoeGender.MALE;
        break;

    case "female":
        gender = AdjoeGender.FEMALE;
        break;

    default:
        gender = AdjoeGender.UNKNOWN;
        break;
}

// set the birthday
Date birthday = getUserBirthday();

// if you don't know the exact birthday, the year is already enough
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, getYearOfBirth());
calendar.set(Calendar.MONTH, 0);
calendar.set(Calendar.DAY_OF_MONTH, 0);
birthday = calendar.getTime();

String source = ""; // where did you get the user's profile information from? "facebook", "google", ...

try {
    // send the profile information to adjoe
    Adjoe.setProfile(context, source, gender, birthday);
} catch(AdjoeNotInitializedException e) {
    // make sure to initialize the adjoe SDK first
}

This method call has no effect if the user has not accepted the adjoe Terms of Service or is blocked by the adjoe services.

Adjoe Parameters

You can pass additional UA and placement parameters when you send the user profile:

AdjoeParams adjoeParams = new AdjoeParams.Builder()
                .setUaNetwork("network")
                .setUaChannel("channel")
                .setUaSubPublisherCleartext("SubPublisherCleartext")
                .setUaSubPublisherEncrypted("SubPublisherEncrypted")
                .setPlacement("placement")
                .build();
AdjoeUserProfile adjoeUserProfile = new AdjoeUserProfile(gender, birthday);
Adjoe.setProfile(context, source, adjoeUserProfile, adjoeParams, listener);

It is also possible to only set the AdjoeParams object using the setUAParams method:

Adjoe.setUAParams(context, adjoeParams);