-
Notifications
You must be signed in to change notification settings - Fork 0
Settings
In order to provide location targeted ads, the Yieldmo Android SDK is capable of leveraging the location permissions of the publishers application.
By default, the SDK will not include a location in ad requests. The publisher has two methods to enable location data to be included in ad requests:
If your application already has permission to obtain the device location, i.e. enabled in the AndroidManifest.xml like so:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yieldmo.demo">
...
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
...
</manifest>By default, the SDK will not leverage these application permissions to gain the device location. Instead, the publisher has to explicitly grant us permission in order to automatically retrieve the device location. That is done through the following code:
Yieldmo.setLocationPermissionEnabled(true);When enabled, the Yieldmo SDK will fetch location data through whatever permissions have been granted to the application on subsequent ad requests.
As an alternative, a publisher is also able to pass a direct Location object to the Yieldmo SDK. This is done as follows:
Yieldmo.setLocation(Location location);Afterwards, any ad requests will include the details of location
The Yieldmo SDK uses Android's Logging Framework, to send system logs related to the SDK's functioning.
To enable logging:
YMLogger.setLogLevel(YMLogger.LogLevel.Verbose);-
YMLogger.LogLevel.None(Default Level) YMLogger.LogLevel.ErrorYMLogger.LogLevel.WarnYMLogger.LogLevel.InfoYMLogger.LogLevel.DebugYMLogger.LogLevel.Verbose
While there are direct Java APIs for configuring the Yieldmo SDK, some of these settings can be set via the application's AndroidManifest.xml through custom Manifest tags.
Using <meta-data> tags in the AndroidManifest.xml file of the application, the following settings can be configured (Instructions for using meta-data in the application manifest):
-
<meta-data android:name="com.yieldmo.sdk.locationPermissionEnabled" android:value="Boolean"/>: This tag will set whether the Yieldmo SDK has permission to retrieve location data automatically. true = enabled, false = disabled -
<meta-data android:name="com.yieldmo.sdk.loggingEnabled" android:value="Boolean"/>: This tag will set the log level based on the Boolean value. true = Info, false = None
-
<meta-data android:name="com.yieldmo.sdk.supportsSMS" android:value="Boolean"/>: This tag will set whether MRAID SMS ads should be supported -
<meta-data android:name="com.yieldmo.sdk.supportsTel" android:value="Boolean"/>: This tag will set whether MRAID Telephone ads should be supported -
<meta-data android:name="com.yieldmo.sdk.supportsCalendar" android:value="Boolean"/>: This tag will set whether MRAID Calendar ads should be supported -
<meta-data android:name="com.yieldmo.sdk.supportsStorePicture" android:value="Boolean"/>: This tag will set whether MRAID Picture ads should be supported
- Home
- [Key Terms](Key Terms)
Start Here
- Integration
- Doubleclick for Publishers
- [Before you Launch](Before You Go Live)
- [Listening for Ad Events](Listening for Ad Events)
- Additional Settings
- [Page View](Page View)
- [Custom Content Frame](Content Frame)
- Proguard
Have a previous SDK?
- [Upgrade Guide](Upgrade Guide)