PanlgeCommon.Image.Alt.LogoPangleText|実装ガイド
ナレッジセンター
日本語はただ今翻訳中ですのでしばらくお待ちください。ご理解のほどお願いいたします!

Integration

Environment requirement:

  • minSdkVersion 16 and higher
    • Note: we only supported minSdkVersion 19 and higher in Pangle SDK v6.0.0.0 and above
  • targetSDKVersion 29 and higher
  • compileSdkVersion 29 and higher
  • gradleVersion required as below

Note: Pangle started using Android X in v5.0.0.0, if you need to upgrade to v5.0.0.0, please use Android X for development.

Import Pangle SDK

Note: JFrog has announced that they are shutting down the Bintray hosting service, which includes the popular JCenter hosting service for Java artifacts . The Pangle Android repository has been migrated to Maven

Apps can import the Pangle SDK with Gradle dependency. First, make sure that Maven is referenced in the allprojects section of your project-level build.gradle file with the url 'https://artifact.bytedance.com/repository/pangle'.

Example project-level build.gradle (excerpt)

Note: Gradle version 7+

If you’re using Gradle version 7+, update your repository section on your settings.gradle file, instead of build.gradle.

Next, open the app-level build.gradle file for your app, and look for a "dependencies" section.

Add the line in bold above, which instructs Gradle to pull in the Pangle SDK and additional related dependencies. Once that's done, save the file and perform a Gradle sync.

Note: The com.google.android.gms.permission.AD_ID permission is included by default starting in version 5.8.0.5 of Pangle Android SDK.

Update your AndroidManifestl.xml

Add the required permissions to your app's AndroidManifest.xml file, as shown below.

Obfuscation

Proguard

To avoid obfuscating the SDK code when using Proguard, ensure that the following configuration is added to the end of the Proguard.cfg file or any other obfuscated files:

Pangle SDK version 3.6.0.0 or later includes a Proguard file in the AAR package named proguard.txt. The default APK packaging references this file. If the Proguard task is modified in the Gradle build script, it is important to merge the content proguard.txt into the final Proguard configuration to prevent app malfunction or failure due to missing code or resources.

Please make sure not to obfuscate our resource file, you can download the complete whitelist of each version from the platform. If you obfuscate the APK using the AndResGuard resource obfuscation tool, be sure to add all the contents of the whiteList.txt provided by Pangle to your project's whitelist.

Or you can download whiteList here: link

Version 5.1.0.0 or later of the Pangle SDK includes a fuzzy matching feature that facilitates the matching and location of files for whitelisting, without the need to specify precise file locations.

Here are the examples:

Shrinkresources

If you use shrinkresource, please add our resource file to your whitelist.

Advanced topics

The app-ads.txt project is an initiative of the Interactive Advertising Bureau (IAB) that aims to reduce mobile advertising fraud. Developers need to refer to the documentation to configure app-ads.

License

The LICENSE file declares the open-source libraries and licenses utilized by the Pangle SDK. If your application is required to publicly disclose the open-source libraries used, you must declare both the open-source libraries and the corresponding license content employed by the Pangle SDK.

Note: This feature is only supported with v5.8.0.0 and later. Please refer to the download link