{"_id":"590a04f6ed80861900cbc791","project":"55b2d5baa74a380d00e290c4","parentDoc":null,"version":{"_id":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","__v":4,"createdAt":"2017-05-03T16:27:30.085Z","releaseDate":"2017-05-03T16:27:30.085Z","categories":["590a04f3ed80861900cbc738","590a04f3ed80861900cbc739","590a04f3ed80861900cbc73a","590a04f3ed80861900cbc73b","590a04f3ed80861900cbc73c","590a04f3ed80861900cbc73d","590a04f3ed80861900cbc73e","590a04f3ed80861900cbc73f","590a04f3ed80861900cbc740","590a04f3ed80861900cbc741","590a04f3ed80861900cbc742","590a04f3ed80861900cbc743","590a04f3ed80861900cbc744","590a04f3ed80861900cbc745","590a04f3ed80861900cbc746","590a04f3ed80861900cbc747","590a04f3ed80861900cbc748","590a04f3ed80861900cbc749","590a04f3ed80861900cbc74a","590a04f3ed80861900cbc74b","590a04f3ed80861900cbc74c","590a04f3ed80861900cbc74d","59124949de13f61900336a7a","5914b04e7c2c552d008b7104","5914b47242c6a22300b9dc20"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"7.0.0","version":"7"},"__v":0,"user":"55b2d5626862a10d00887af9","category":{"_id":"590a04f3ed80861900cbc73c","__v":0,"version":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-11T21:56:19.274Z","from_sync":false,"order":4,"slug":"android-quickstart","title":"Android Quickstart"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-12T16:55:56.329Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"We **highly recommend** using the automatic buddybuild SDK integration right from the buddybuild dashboard.\n\nHowever, if you wish to install the buddybuild SDK manually, follow the steps on this page.\n\n**As of July 2016, the method count of the SDK is 1,175.**\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Step 1: Add plugins to build.gradle\"\n}\n[/block]\nIn order to pull in the plugins needed to build the app with the SDK, add the following line to your build.gradle file:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"repositories {\\n\\t\\tjcenter()\\n\\n  \\tmaven {\\n  \\t\\t\\turl 'https://dl.bintray.com/buddybuild/maven'\\n\\t\\t}\\n}\\n\\ndependencies {\\n  \\tcompile 'com.buddybuild:sdk:0.0.59:::at:::aar'\\n\\t\\tcompile 'com.squareup:seismic:1.0.2'\\n\\t\\tcompile 'ch.acra:acra:4.6.2'\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Two things to note here:\\n1. You can put the \\\"repositories\\\" section in the base build.gradle file, but you need to put it under the \\\"allprojects\\\" section.\\n2. Note the \\\"aar\\\" at the end of \\\"com.buddybuild:sdk:0.0.58\\\"\",\n  \"title\": \"Tips\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Step 2: Add Permissions to AndroidManifest.xml\"\n}\n[/block]\nThe following permissions allow the SDK to send feedback, as well as to collect adb log in case of app crash:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<uses-permission android:name=\\\"android.permission.INTERNET\\\"/>\\n<uses-permission android:name=\\\"android.permission.READ_LOGS\\\"/>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Step 3: setup SDK on Application.onCreate()\"\n}\n[/block]\nOne last thing to do is to start up the SDK upon app start. All you need to do is to add **BuddyBuild.setup(this)** to your **Application** class.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"This will **not** work properly when added to the **main activity** class instead.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"package buddybuild.com.helloworldandroid;\\n\\nimport android.app.Application;\\nimport com.buddybuild.sdk.BuddyBuild;\\n\\npublic class MainApplication extends Application {\\n    @Override\\n    public void onCreate() {\\n        super.onCreate();\\n      \\n        BuddyBuild.setup(this);\\n    }\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"manual-sdk-integration","type":"basic","title":"SDK Manual Integration"}

SDK Manual Integration


We **highly recommend** using the automatic buddybuild SDK integration right from the buddybuild dashboard. However, if you wish to install the buddybuild SDK manually, follow the steps on this page. **As of July 2016, the method count of the SDK is 1,175.** [block:api-header] { "type": "basic", "title": "Step 1: Add plugins to build.gradle" } [/block] In order to pull in the plugins needed to build the app with the SDK, add the following line to your build.gradle file: [block:code] { "codes": [ { "code": "repositories {\n\t\tjcenter()\n\n \tmaven {\n \t\t\turl 'https://dl.bintray.com/buddybuild/maven'\n\t\t}\n}\n\ndependencies {\n \tcompile 'com.buddybuild:sdk:0.0.59@aar'\n\t\tcompile 'com.squareup:seismic:1.0.2'\n\t\tcompile 'ch.acra:acra:4.6.2'\n}", "language": "json" } ] } [/block] [block:callout] { "type": "warning", "body": "Two things to note here:\n1. You can put the \"repositories\" section in the base build.gradle file, but you need to put it under the \"allprojects\" section.\n2. Note the \"aar\" at the end of \"com.buddybuild:sdk:0.0.58\"", "title": "Tips" } [/block] [block:api-header] { "type": "basic", "title": "Step 2: Add Permissions to AndroidManifest.xml" } [/block] The following permissions allow the SDK to send feedback, as well as to collect adb log in case of app crash: [block:code] { "codes": [ { "code": "<uses-permission android:name=\"android.permission.INTERNET\"/>\n<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "language": "xml" } ] } [/block] [block:api-header] { "type": "basic", "title": "Step 3: setup SDK on Application.onCreate()" } [/block] One last thing to do is to start up the SDK upon app start. All you need to do is to add **BuddyBuild.setup(this)** to your **Application** class. [block:callout] { "type": "warning", "body": "This will **not** work properly when added to the **main activity** class instead." } [/block] [block:code] { "codes": [ { "code": "package buddybuild.com.helloworldandroid;\n\nimport android.app.Application;\nimport com.buddybuild.sdk.BuddyBuild;\n\npublic class MainApplication extends Application {\n @Override\n public void onCreate() {\n super.onCreate();\n \n BuddyBuild.setup(this);\n }\n}", "language": "java" } ] } [/block]