Security and privacy

GDPR/COPPA

Alert

When using Easy Monetization, it's your responsibility to ensure that your app is compliant with all the applicable privacy policies. If you collect and/or transmit any data, you have to make sure that the data is collected, secured, and managed properly.

Method

Description

setUserConsent

Pass the received value to the SDK.

Data collected from users in GDPR countries is only processed with the user's consent.

setAgeRestrictedUser

By default, all users are assumed to be at least 13 years old.

Privacy policies can be configured like this in class Application

private fun initPreferences() {
    val preferences = PreferenceManager.getDefaultSharedPreferences(this)
    preferences.run {
        MobileAds.setUserConsent(getBoolean(GdprDialogFragment.TAG, false))
        MobileAds.setLocationConsent(getBoolean(LocationDialogFragment.TAG, false))
        MobileAds.setAgeRestrictedUser(getBoolean(CoppaDialogFragment.TAG, false))
    }

	companion object {
    	const val TAG = "gdpr"
    	private const val PRIVACY_POLICY_URL = "https://your_privacy_policy_url.html"
	}
}

Warning

This snippet is just an example, not a step-by-step guide.

class GdprDialogFragment : DialogFragment() {
    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
        val context = requireContext()
        val builder: AlertDialog.Builder = AlertDialog.Builder(context)
        builder.setTitle("This is sample of GDPR dialog")
            .setMessage("This application contains Yandex advertising code that collects data in order to show you relevant ads that better match your interests. To learn more about how and why Yandex processes your data, see the Privacy Policy.")
            .setPositiveButton("Accept") { _, _ -> onButtonClicked(context, true) }
            .setNeutralButton("About") { _, _ -> openPrivacyPolicy() }
            .setNegativeButton("Decline") { _, _ -> onButtonClicked(context, false) }
        return builder.create()
    }

    private fun openPrivacyPolicy() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse(PRIVACY_POLICY_URL))
        startActivity(intent)
    }

    private fun onButtonClicked(context: Context, userConsent: Boolean) {
        val preferences: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
        preferences.edit()
            .putBoolean(SettingsFragment.USER_CONSENT_KEY, userConsent)
            .putBoolean(SettingsFragment.DIALOG_SHOWN_KEY, true)
            .apply()
        noticeDialogListener.onDialogClick()
    }
}
public class GdprDialogFragment extends DialogFragment {
    // Example of creating a dialog window.
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        final Context context = getContext();

        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setTitle(R.string.gdpr_dialog_title)
                .setMessage(R.string.gdpr_dialog_message)
                .setPositiveButton(R.string.accept, (dialog, id) ->
                        onButtonClicked(context, true))
                .setNeutralButton(R.string.about, (dialog, which) ->
                        openPrivacyPolicy())
                .setNegativeButton(R.string.decline, (dialog, id) ->
                        onButtonClicked(context, false));
        return builder.create();
    }

    private void openPrivacyPolicy() {
        final String url = getString(R.string.privacy_policy_url);
        final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
        startActivity(intent);
    }

    private void onButtonClicked(final Context context,
                                 final boolean userConsent) {
        final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
        preferences.edit()
                .putBoolean(SettingsFragment.USER_CONSENT_KEY, userConsent)
                .putBoolean(SettingsFragment.DIALOG_SHOWN_KEY, true)
                .apply();

        mNoticeDialogListener.onDialogClick();
    }
}

Data types

Information about how each type of user data is collected and transmitted.

Data type

Description

Collection of Mobile Ads SDK data (default configuration)

Location

Precise location

User or device location in an area of less than 3 square kilometers, such as location provided by Android's ACCESS_FINE_LOCATION permission.

No

The app developer can optionally set up the transmission of this data by enabling the locationConsent parameter in the SDK settings.

Approximate location

User or device location in an area greater than or equal to 3 square kilometers, such as the user's city or location provided by Android's ACCESS_COARSE_LOCATION permission.

No

The app developer can optionally set up the transmission of this data by enabling the locationConsent parameter in the SDK settings.

Personal info

Name

How the user refers to themselves, such as their first or last name, or nickname.

No

Email address

The user's email address.

No

User IDs

User IDs, such as an account number, account ID, or account name.

No

Address

The user's address, such as their mailing or home address.

No

Phone number

The user's phone number.

No

Race and ethnicity

Information about the user's race or ethnicity.

No

Political or religious beliefs

Information about the user's political or religious beliefs.

No

Sexual orientation

Information about the user's sexual orientation.

No

Other info

Any other personal info, such as the user's date of birth, gender identity, or veteran status.

No

Financial info

User payment info

Information about the user's financial accounts, such as a credit card number.

No

Purchase history

Information about the user's purchases and transactions.

No

Credit score

Information about the user's credit.

No

Other financial info

Any other financial info, such as the user's salary or debts.

No

Health and fitness

Health info

Information about the user's health, such as medical records or symptoms.

No

Fitness info

Information about the user's physical activity, such as regular exercises.

No

Messages

Emails

The user’s emails including the subject line, senders, recipients, and message content.

No

SMS or MMS

The user's text messages including information on senders, recipients, and message content.

No

Other in-app messages

Any other types of messages, such as instant messages or chat content.

No

Photos and videos

Photos

The user's photos.

No

Videos

The user's videos.

No

Audio files

Voice or sound recordings

The user's voice recordings, such as a voicemail or sound recording.

No

Music files

The user's music files.

No

Other audio files

Any other user-created or user-provided audio files.

No

Files and docs

Files and docs

The user's files and documents or information about their files and documents, such as file names.

No

Calendar

Calendar events

Information from the user's calendar such as events, event notes, and attendees.

No

Contacts

Contacts

Information about the user's contacts, such as contact names or message history, as well as their usernames, contact recency, contact frequency, interaction duration, and call history.

No

App activity

App interactions

Information about how the user interacts with the app. For example, the number of times they visit a page or sections they tap on.

No

In-app search history

Information about the user's search queries in the app.

No

Installed apps

Information about the apps installed on the user's device.

No

Other user-generated content

Any other user-generated content not mentioned in any section, such as their bios, notes, or open-ended responses.

No

Other actions

Any other user activity or in-app actions not listed here, such as their gameplay, likes, and dialog options.

No

Web browsing

Web browsing history

Information about the websites visited by the user.

No

App info and performance

Crash logs

Data from your app's crash log, such as the number of times the app has crashed, stack traces, or other info directly related to a crash.

No

Diagnostics

Information about your app's performance, such as battery life, loading time, latency, frame rate, or any technical diagnostics.

No

Other app performance data

Any other app performance data not mentioned here.

No

Device or other IDs

Device or other IDs

For example, advertising ID or any other device-related ID.

Yes, if the respective permission is granted in the app. Learn more about how to use advertising IDs.