Test Mode(Android)
#
IntroductionAfter completing the integration of TradPlus, developers need to conduct testing. In order to facilitate developers to verify the integration effect, TradPlus provides a test mode. After the developer configures the test mode in the TradPlus background, it can be tested directly.
#
Step 1、Preconditions#
1.1 The test machine is a real machineThe advertising platform does not adapt to the simulator. For example: when using a simulator to test overseas advertising sources, errors are often reported due to the lack of certain libraries in the simulator, which cannot be resolved.
#
1.2 Get Device ID- (1)You must initiate an advertisement request after the initialization is successful before you can get the delivered configuration. The code example is as follows:
- (2)When initializing the TP SDK, fill in the application ID correctly. Wrong application ID will result in no match.
Android Platform
Unity3D Platform
- (3)After successful initialization, Logcat filters TradPlusLog to obtain the GAID and TpUserId of the test machine:
#
Step 2、Background configuration test mode#
2.1 Enter the settings pageIn Advanced Settings --> Test Mode , enter the test mode setting page of the ad slot
#
2.2 Add test equipment- When adding a test device, fill in the device ID, device name, application and ad network
- The device ID supports the following content: Android supports GAID, OAID
#
2.3 Switch to test mode- After the test device is successfully added, restart the application.
- initialize the SDK, and initiate an ad request after receiving the initialization success callback, which will switch to the test mode (if the switch is not successful, you can request it again)
#
Step 3、Confirm to enable test mode- LogCat filters "TradPlusLog" to confirm, if there is "----- TradPlus TestMode Is On ----- ", it indicates that it has been successfully turned on, otherwise there will be no Log printing (supported by V7.7.0.1 and above)
- Development needs to pay attention to closing the test mode after the test is completed, otherwisethe advertisement configured in the test mode will be sent all the time
#
Step 4、Advertisement Source Test Precautions#
4.1 Meta(FaceBook)The meta test needs to meet many conditions. If you want to know more, please jump to the official instructions to view the Audience Network integration checklist and ad request error codes ,The following briefly describes the precautions:
- (1)Install and log in the Facebook application on the test device;
- (2)Check whether the above "Prerequisites for Configuring Test Mode" has been met, such as: real machine, overseas network, setting TestDevice, etc
#
4.2 Google AdMob- Add your AdMob app ID to your app's AndroidManifest.xml file. The App ID can be found in the AdMob UI. Replace it with your own account APP ID before the official launch. The code below is for testing purposes only。If in doubt, please see the official instructions Set up your app in your AdMob account
- AdMob 20.3.0 or lower, and Android S as the target platform application, you must add the com.google.android.gms.permission.AD_ID permission in the AndroidManifest.xml file
- AdMob 20.4.0 or later, AdMob SDK has automatically declared permissions