{"id":19294928,"url":"https://github.com/moesif/moesif-android","last_synced_at":"2025-11-11T20:09:09.179Z","repository":{"id":75402088,"uuid":"71734818","full_name":"Moesif/moesif-android","owner":"Moesif","description":"Moesif SDK for Android","archived":false,"fork":false,"pushed_at":"2024-11-15T19:41:43.000Z","size":81,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-01T20:51:33.313Z","etag":null,"topics":["android","api","api-client","logger","logging","logging-library","okhttp3","okhttp3-integration","okhttp3-logginginterceptor","volley"],"latest_commit_sha":null,"homepage":"https://www.moesif.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Moesif.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-23T23:02:07.000Z","updated_at":"2024-11-15T21:00:19.000Z","dependencies_parsed_at":"2023-06-06T09:45:29.290Z","dependency_job_id":null,"html_url":"https://github.com/Moesif/moesif-android","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moesif%2Fmoesif-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moesif%2Fmoesif-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moesif%2Fmoesif-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moesif%2Fmoesif-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Moesif","download_url":"https://codeload.github.com/Moesif/moesif-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250205986,"owners_count":21392159,"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":["android","api","api-client","logger","logging","logging-library","okhttp3","okhttp3-integration","okhttp3-logginginterceptor","volley"],"created_at":"2024-11-09T22:40:32.783Z","updated_at":"2025-11-11T20:09:09.002Z","avatar_url":"https://github.com/Moesif.png","language":"Java","readme":"This repo is deprecated, for capture outgoing API calls in Java/Kotlin envinroment, including Android, we recommend \n\nhttps://github.com/Moesif/moesif-java-okhttp-interceptor\n\n# Moesif SDK for Android\n\n[![Built For][ico-built-for]][link-built-for]\n[![Latest Version][ico-version]][link-package]\n[![Software License][ico-license]][link-license]\n[![Source Code][ico-source]][link-source]\n\nmoesif-android is a SDK that automatically captures HTTP traffic such as to your internal APIs or external APIs like Stripe\nand sends to [Moesif](https://www.moesif.com) for API analytics and log analysis.\n\n\n## Requirements\nThis lib requires the use of OkHttp 2.2 or better. OkHttp 3.x is also supported.\n\nThe two popular Android networking clients (Volley and Retrofit) support using OkHttp so you are probably fine if using one of these two libs.\n\nIf using Retrofit, 1.9 or greater is required.\nIf using Volley, a simple one line change is required to use our MoesifOkHttpXStack.\n\n## Module Structure\n__moesif-android:__\nThe core SDK shared across platforms, imported automatically by the below HTTP stack specific modules.\n\n__moesif-android-okhttp3:__\nSupports the latest version (3.x) of OkHttp\n\n__moesif-android-okhttp2:__\nIf you want to stick with OkHttp 2.x for legacy reasons, import this module instead of moesif-android-okhttp3\n\n## How To Configure:\n\n### 1. Add the dependency to your app/build.gradle\n```gradle\n# Add the jcenter repository, if not present\n\nrepositories {\n  jcenter()\n}\n\ndependencies {\n    compile 'com.moesif.android:moesif-android-okhttp3:1.1.2'\n}\n```\n\nIf your Android project imports Volley as an unmanaged artifact, you may have to exclude volley as a transitive dependency:\nOtherwise, you may get duplicate class errors.\n\n```gradle\n# Add the jcenter repository, if not present\n\nrepositories {\n  jcenter()\n}\n\ndependencies {\n    compile ('com.moesif.android:moesif-android-okhttp3:1.1.2') {\n        exclude group: 'com.android.volley'\n    }\n}\n```\n\n### 2. In your AndroidManifest.xml, add your Moesif ApplicationId under the \"application\" node:\n\nYour Moesif Application Id can be found in the [_Moesif Portal_](https://www.moesif.com/).\nAfter signing up for a Moesif account, your Moesif Application Id will be displayed during the onboarding steps. \n\nYou can always find your Moesif Application Id at any time by logging \ninto the [_Moesif Portal_](https://www.moesif.com/), click on the top right menu,\n and then clicking _Installation_.\n\n```xml\n\u003capplication\u003e\n\n    \u003c!-- Your other code --\u003e\n\n    \u003cmeta-data\n        android:name=\"com.moesif.android.ApplicationId\"\n        android:value=\"Your Moesif Application Id\" /\u003e\n\u003c/application\u003e\n```\n\n### 3. In your Application's onCreate(), initialize the lib\n\n```java\nimport com.moesif.android.MoesifClient;\n\npublic final class MyApplicationClass extends Application {\n\n    @Override\n    public void onCreate() {\n        MoesifClient.initialize(this);\n    }\n}\n```\n\n\n### 4. Add the Interceptor\n\n#### 4.a If using Retrofit/OkHttp3 natively:\nAdd the Moesif MoesifOkHttp3Interceptor when building the Retrofit/OkHttp Client.\nIf you have existing interceptors, you probably want Moesif's interceptor last in the chain to ensure it captures the HTTP call\njust before going over the wire.\n[See more Info on using OkHttp Interceptors](https://github.com/square/okhttp/wiki/Interceptors)\n\n\n```java\nimport com.moesif.android.okhttp3;\n\nOkHttpClient client = new OkHttpClient.Builder()\n    .addInterceptor(new MoesifOkHttp3Interceptor())\n    .build();\n\n```\n\n#### 4.a If using Volley:\nPass in a new MoesifOkHttp3Stack object when creating Volley's request queue.\n[See more info on setting up volley](https://developer.android.com/training/volley/requestqueue.html)\n\n\n```java\nimport com.moesif.android.okhttp3;\n\n    RequestQueue queue = Volley.newRequestQueue(myContext.getApplicationContext(),\n                                                new MoesifOkHttp3Stack());\n\n```\n\n## Configuring using OkHttp2:\nFollow the previous configuration steps, except a few changes:\n\n### 1. Import moesif-android-okhttp2 instead\n```gradle\n# Add the jcenter repository, if not present\nrepositories {\n  jcenter()\n}\n\ndependencies {\n    compile 'com.moesif.android:moesif-android-okhttp2:1.1.2'\n}\n```\n\n### 2. Use the corresponding OkHttp2 classes instead.\n\n#### 2.a If using Retrofit/OkHttp3 natively:\n```java\nimport com.moesif.android.okhttp2;\n\nOkHttpClient myHttpClient new OkHttpClient();\nmyHttpClient.networkInterceptors().add(new MoesifOkHttp2Interceptor());\n\n```\n\n#### 2.a Or Volley:\n```java\nimport com.moesif.android.okhttp2;\n\n    RequestQueue queue = Volley.newRequestQueue(myContext.getApplicationContext(),\n                                                new MoesifOkHttp2Stack(new OkHttpClient()));\n\n```\n\n## License info for the Android SDK\nSee [LICENSE File](https://raw.githubusercontent.com/Moesif/moesif-android/master/LICENSE) for details. The MoesifOkHttp3Stack and\nMoesifOkHttp2Stack classes, and the entirety of the com.moesif.android.inspector package used by this\nsoftware have been licensed from non-Moesif sources and modified\nfor use in the library. Please see the relevant source files, and the\nLICENSE file in the com.moesif.android.inspector package for details.\n\n## Other Integrations\n\nTo view more more documenation on integration options, please visit __[the Integration Options Documentation](https://www.moesif.com/docs/getting-started/integration-options/).__\n\n[ico-built-for]: https://img.shields.io/badge/built%20for-android-blue.svg\n[ico-version]: https://api.bintray.com/packages/moesif/maven/moesif-android/images/download.svg\n[ico-license]: https://img.shields.io/badge/License-Apache%202.0-green.svg\n[ico-source]: https://img.shields.io/github/last-commit/moesif/moesif-android.svg?style=social\n\n[link-built-for]: https://developer.android.com/\n[link-package]: https://bintray.com/moesif/maven/moesif-android/_latestVersion\n[link-license]: https://raw.githubusercontent.com/Moesif/moesif-android/master/LICENSE\n[link-source]: https://github.com/moesif/moesif-android\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoesif%2Fmoesif-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoesif%2Fmoesif-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoesif%2Fmoesif-android/lists"}