{"id":23080832,"url":"https://github.com/appodeal/stack-holisticsolution-sdk-android","last_synced_at":"2025-04-03T13:48:05.100Z","repository":{"id":44918428,"uuid":"276130019","full_name":"appodeal/Stack-HolisticSolution-SDK-Android","owner":"appodeal","description":"Stack Holistic Solution SDK for Android simplifies the collection and transfer of the necessary parameters from third-party services to the corresponding Stack SDKs to improve the performance of services such as Mediation and UA","archived":false,"fork":false,"pushed_at":"2022-01-18T16:35:24.000Z","size":305,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T02:42:46.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appodeal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-30T14:55:59.000Z","updated_at":"2021-12-10T11:56:33.000Z","dependencies_parsed_at":"2022-09-15T20:21:23.069Z","dependency_job_id":null,"html_url":"https://github.com/appodeal/Stack-HolisticSolution-SDK-Android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2FStack-HolisticSolution-SDK-Android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2FStack-HolisticSolution-SDK-Android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2FStack-HolisticSolution-SDK-Android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2FStack-HolisticSolution-SDK-Android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appodeal","download_url":"https://codeload.github.com/appodeal/Stack-HolisticSolution-SDK-Android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247014515,"owners_count":20869376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T13:16:45.354Z","updated_at":"2025-04-03T13:48:05.039Z","avatar_url":"https://github.com/appodeal.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\nStack Holistic Solution SDK for Android simplifies the collection and transfer of the necessary parameters from third-party services to the corresponding Stack SDKs to improve the performance of services such as Mediation and UA\n\n## Integration Guide\n- [Before integration started](#before-integration-started)\n- [Import SDK](#import-sdk)\n\t- [Add the Appodeal maven repository](#1-add-the-appodeal-maven-repository)\n\t- [Add maven dependencies](#2-add-maven-dependencies)\n\t- [Setup required services](#3-setup-required-services)\n\t\t- [Facebook Service](#31-facebook-service)\n\t\t- [Firebase Service](#32-firebase-service)\n* [Initialize SDK](#initialize-sdk)\n* [Features](#features)\n  * [Enable debug logic](#enable-debug-logic)\n  * [Enable logs](#enable-logs)\n  * [Events](#events)\n  * [In-App purchase validation](#purchase-validation)\n\n## Before integration started\n\nHS SDK using [AndroidX](https://developer.android.com/jetpack/androidx), so please make sure you have enabled [Jetifier](https://developer.android.com/jetpack/androidx#using_androidx_libraries_in_your_project)\n\n## Import SDK\n\n### 1. Add the Appodeal maven repository\n\nApps can import the HS SDK with a Gradle dependency that points to the Appodeal's Maven repository. In order to use that repository, you need to reference it in the app's project-level build.gradle file. Open yours and look for an allprojects section:\n\nExample project-level build.gradle (excerpt)\n\n```groovy\nallprojects {\n    repositories {\n        // ... other project repositories\n        maven {\n            url \"https://artifactory.appodeal.com/appodeal\"\n        }\n    }\n}\n```\n\n### 2. Add maven dependencies\n\nNext, open the app-level build.gradle file for your app, and look for the dependencies section:\n\nExample app-level build.gradle (excerpt)\n\n```groovy\ndependencies {\n    // ... other project dependencies\n    implementation 'com.explorestack.hs:sdk:2.0.2.+'\n}\n```\n\n### 3. Setup required services\n#### 3.1. Facebook Service\n\u003e Note that HS Facebook Service will include only 'facebook-core' dependency independently\n\n###### 1. Configure Your Facebook App\n\nPlease follow this [guide](https://developers.facebook.com/docs/app-events/getting-started-app-events-android) to configure you Facebook app\n\n###### 2. Add Your Facebook App ID\n\n\u003e You can find more info about Facebook integrations in this [guide](https://developers.facebook.com/docs/app-events/getting-started-app-events-android)\n\nOpen your `/app/res/values/strings.xml` file and add the following lines (remember to replace `[APP_ID]` with your actual Facebook app ID):\n\n```xml\n\u003cstring name=\"facebook_app_id\"\u003e[APP_ID]\u003c/string\u003e\n```\n\nAdd a `meta-data` element to the application element:\n\n```xml\n\u003capplication ...\u003e\n    ...\n    \u003cmeta-data\n        android:name=\"com.facebook.sdk.ApplicationId\"\n        android:value=\"@string/facebook_app_id\"/\u003e\n    ...\n\u003c/application\u003e\n```\n#### 3.2. Firebase Service\n\u003eNote that HS Firebase Service will include 'firebase-analytics' and 'firebase-config' dependencies independently\n\n###### 1. Configure Your Firebase App\n\nPlease, follow this [guide](https://firebase.google.com/docs/android/setup#console) to configure you Firebase app\n\n##  Initialize SDK\n\nHolistic Solution SDK will automatically initialize all components and sync all required data to connectors (e.g - Appodeal).\n\nTo initialize SDK add the line below to onCreate method of your application or activity class.\n\nInitialization example:\n\n```java\npublic class YourApplication extends Application {\n    ...\n    @Override\n    public void onCreate() {\n        super.onCreate();\n\n\t//Create HSApp configuration\n        HSAppConfig appConfig = new HSAppConfig()\n                .setAppKey(YOUR_APPODEAL_KEY)\n                .setAdType(REQUIRED_ADS_TYPES)\n                .setDebugEnabled(...)\n                .setComponentInitializeTimeout(...);\n\n        //Initialize HSApp\n        HSApp.initialize(activity, appConfig, new HSAppInitializeListener() {\n            @Override\n            public void onAppInitialized(@Nullable List\u003cHSError\u003e errors) {\n                //HSApp initialization finished, now you can initialize required SDK\n            }\n        });\n    }\n    ...\n}\n```\n| Parameter            | Description                                                                                                        \t\t               |\n|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| appKey               | [Appodeal application key](https://app.appodeal.com/apps).\t\t\t\t\t\t\t                                                       |\n| adType               | Appodeal ad types (e.g - `Appodeal.INTERSTITIAL`).                                   \t           \t                        \t\t\t   |\n| debug                | Enable sdk, services and connectors debug logic if possible.                        \t\t\t\t                             \t\t   |\n| timeout              | In this case is timeout for **one** operation: starting attribution service or fetching remote config. By default the value is **30 sec**.|\n\n[Code example](example/src/main/java/com/explorestack/hs/sdk/example/ExampleApplication.java#L28)\n\n\n## Features\n\n#### Enable logs\nEnable HSApp, services and connectors logging.\n\n```java\nHSLogger.setEnabled(true)\n```\nAfter enabling it, you can view logs by the `HSApp` tag\n\n#### Events\nHolistic Solution SDK allows you to send events to analytic services such as Firebase, AppsFlyer and Facebook using a single method:\n```java\n// Create map of event parameters if required\nMap\u003cString, Object\u003e params = new HashMap\u003c\u003e();\nparams.put(\"example_param_1\", \"Param1 value\");\nparams.put(\"example_param_2\", 123);\n\n// Send event to all connected analytics services\nHSApp.logEvent(\"hs_sdk_example_test_event\", params);\n```\n\n\u003e Event parameters can only be strings and numbers\n\n[Code example](example/src/main/java/com/explorestack/hs/sdk/example/ExampleActivity.java#L67)\n\n\n#### Purchase validation\nHolistic Solution SDK allows you to unify purchase validation using a single method:\n```java\n// Purchase object is returned by Google API in onPurchasesUpdated() callback\npublic void validatePurchase(Purchase purchase) {\n    \n    // Create new HSInAppPurchase\n    HSInAppPurchase hsPurchase = HSInAppPurchase.newBuilder(\"PURCHASE_TYPE\")\n        .withPublicKey(\"YOUR_PUBLIC_KEY\")\n        .withSignature(purchase.getSignature())\n        .withPurchaseData(purchase.getOriginalJson())\n        .withPurchaseToken(purchase.getPurchaseToken())\n        .withPurchaseTimestamp(purchase.getPurchaseTime())\n        .withDeveloperPayload(purchase.getDeveloperPayload())\n        .withOrderId(purchase.getOrderId())\n        .withSku(...)\n        .withPrice(...)\n        .withCurrency(...)\n        .withAdditionalParams(...)\n        .build();\t    \n\n    // Validate InApp purchase\n    HSApp.validateInAppPurchase(hsPurchase, new HSInAppPurchaseValidateListener() {\n        @Override\n        public void onInAppPurchaseValidateSuccess(@NonNull HSInAppPurchase purchase,\n                                                   @Nullable List\u003cHSError\u003e errors) {\n            // In-App purchase validation was validated successfully by at least one\n            // connected service\n        }\n\n        @Override\n        public void onInAppPurchaseValidateFail(@NonNull List\u003cHSError\u003e errors) {\n            // In-App purchase validation was failed by all connected service\n        }\n    });\n}\n```\n\n| Parameter            | Description                                                                                                        | Usage                     |\n|----------------------|--------------------------------------------------------------------------------------------------------------------|---------------------------|\n| purchaseType         | Purchase type. Must be one of [PurchaseType](sdk/src/main/java/com/explorestack/hs/sdk/HSInAppPurchase.java#L7).   | Adjust/AppsFlyer          |\n| publicKey            | [Public key from Google Developer Console](https://support.google.com/googleplay/android-developer/answer/186113). | AppsFlyer                 |\n| signature            | Transaction signature (returned from Google API when the purchase is completed).                                   | Adjust/AppsFlyer          |\n| purchaseData         | Product purchased in JSON format (returned from Google API when the purchase is completed).                        | AppsFlyer                 |\n| purchaseToken        | Product purchased token (returned from Google API when the purchase is completed).                        \t        | Adjust                    |\n| purchaseTimestamp    | Product purchased timestamp (returned from Google API when the purchase is completed).                        \t    | Adjust                    |\n| developerPayload     | Product purchased developer payload (returned from Google API when the purchase is completed).                     | Adjust                    |\n| orderId              | Product purchased unique order id for the transaction (returned from Google API when the purchase is completed).   | Adjust                    |\n| sku                  | Stock keeping unit id.\t\t\t\t\t\t\t\t\t\t\t                                                    | Adjust                    |\n| price                | Purchase revenue.                                                                                                  | Adjust/AppsFlyer/Appodeal |\n| currency             | Purchase currency.                                                                                                 | Adjust/AppsFlyer/Appodeal |\n| additionalParameters | Additional parameters of the purchase event.                                                                       | Adjust/AppsFlyer          |\n\n\u003e In-App purchase validation runs by FIFO queue in a single thread\n\n[Code example](example/src/main/java/com/explorestack/hs/sdk/example/ExampleActivity.java#L122)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappodeal%2Fstack-holisticsolution-sdk-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappodeal%2Fstack-holisticsolution-sdk-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappodeal%2Fstack-holisticsolution-sdk-android/lists"}