{"_id":"576d42354bcd290e0042894b","category":{"_id":"576d42354bcd290e00428942","version":"576d42354bcd290e00428941","project":"56a526d4e7a1622b0024fae4","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-24T19:32:37.467Z","from_sync":false,"order":0,"slug":"documentation","title":"Our Technology"},"project":"56a526d4e7a1622b0024fae4","version":{"_id":"576d42354bcd290e00428941","project":"56a526d4e7a1622b0024fae4","__v":1,"createdAt":"2016-06-24T14:22:45.076Z","releaseDate":"2016-06-24T14:22:45.076Z","categories":["576d42354bcd290e00428942","576d42354bcd290e00428943","576d42354bcd290e00428944","576d42354bcd290e00428945","576d42354bcd290e00428946","576d42354bcd290e00428947"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"user":"56703859e10ecb0d0004eebb","__v":5,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-24T19:32:38.301Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Register for an app key\"\n}\n[/block]\nBefore you can integrate Chirp into your app, you must first [register for an app key](https://admin.chirp.io/sign_up/create_profile). (If you already have an account, [sign in here.](https://admin.chirp.io/login))\n\nThis will give you the credentials you need to get chirping. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Download the SDK for your platform\"\n}\n[/block]\nWe currently offer SDKs for a [range of platforms](doc:our-sdks), from web-based applications to embedded electronic devices. \n\nVisit the [downloads section of the Chirp Admin Centre](https://admin.chirp.io/downloads) to obtain the SDK for your platform.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"3. Chirp simple data\"\n}\n[/block]\nThis \"Hello World\" example chirps a short text string over the air - no internet connection required.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[[ChirpSDK sdk] setAppKey:YOUR_APP_KEY\\n                 andSecret:YOUR_APP_SECRET\\n            withCompletion:^(BOOL authenticated, NSError *error)\\n{\\n     if (authenticated) { NSLog(:::at:::\\\"Authenticated OK.\\\"); }\\n}];\\n\\nChirp *chirp = [[Chirp alloc] initWithIdentifier:@\\\"a7cnn9c0li\\\"];\\n\\n[chirp chirp];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"ChirpSDK chirpSDK = new ChirpSDK(context, API_KEY, API_SECRET);\\nchirpSDK.play(new ShortCode(\\\"parrotbill\\\"));\\n\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nYou'll notice that this string is quite short.\nChirp's native audio protocol supports strings of 10 characters long, drawn from the alphabet `[0-9a-v]`. Read more about the [Anatomy of a Chirp](doc:chirps-shortcodes).\n\nIt's possible to send more data within a chirp, but that requires speaking to us about a custom protocol. Read more about [Chirp Protocols](doc:chirp-protocols).\n\nReceiving a chirp is just as straightforward:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[[ChirpSDK sdk] setChirpHeardBlock:^(Chirp *chirp, NSError *error)\\n{\\n  NSLog(@\\\"Heard chirp: %@\\\", chirp.identifier);\\n}];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"chirpSDK.setListener(new ChirpSDKListener() {\\n\\n    @Override\\n    public void onChirpHeard(ShortCode shortCode) {\\n            Log.v(\\\"Chirp\\\", \\\"ShortCode received: \\\" + shortCode.getShortCode());\\n    }\\n\\n    @Override\\n    public void onChirpError(ChirpError chirpError) {\\n\\n    }\\n});\\n\\nchirpSDK.startListening();\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"4. Chirping more complex data\"\n}\n[/block]\nFor internet-connected devices, Chirp can seamlessly send arbitrary JSON data structures by sending them to our network API. This generates an identifier that uniquely identifies your data structure.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[[ChirpSDK sdk] createChirpWithDictionary:@{ @\\\"key\\\" : @\\\"value\\\" }\\n                           withCompletion:^(Chirp *chirp, NSError *error)\\n{\\n    if (chirp)\\n    {\\n       NSLog(@\\\"Created a chirp with identifier: %@\\\", chirp.identifier);\\n       [chirp chirp];\\n    }\\n}];\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"JSONObject jsonObj = new JSONObject();\\njsonObj.put(\\\"key\\\", \\\"value\\\");\\njsonObj.put(\\\"more\\\", \\\"data\\\");\\n\\nChirp chirp = new Chirp(jsonObj);\\nchirpSDK.create(chirp, new CallbackCreate() {\\n\\n    @Override\\n    public void onCreateResponse(ShortCode shortCode) {\\n    \\t\\tLog.v(\\\"Chirp\\\", \\\"ShortCode received: \\\" + shortCode.getShortCode());\\n    }\\n\\n    @Override\\n    public void onCreateError(ChirpError chirpError) {\\n\\n    }\\n});\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]","excerpt":"This page will help you get started with Chirp. You'll be up and running in a jiffy!","slug":"getting-started","type":"basic","title":"Quickstart Guide"}

Quickstart Guide

This page will help you get started with Chirp. You'll be up and running in a jiffy!

[block:api-header] { "type": "basic", "title": "1. Register for an app key" } [/block] Before you can integrate Chirp into your app, you must first [register for an app key](https://admin.chirp.io/sign_up/create_profile). (If you already have an account, [sign in here.](https://admin.chirp.io/login)) This will give you the credentials you need to get chirping. [block:api-header] { "type": "basic", "title": "2. Download the SDK for your platform" } [/block] We currently offer SDKs for a [range of platforms](doc:our-sdks), from web-based applications to embedded electronic devices. Visit the [downloads section of the Chirp Admin Centre](https://admin.chirp.io/downloads) to obtain the SDK for your platform. [block:api-header] { "type": "basic", "title": "3. Chirp simple data" } [/block] This "Hello World" example chirps a short text string over the air - no internet connection required. [block:code] { "codes": [ { "code": "[[ChirpSDK sdk] setAppKey:YOUR_APP_KEY\n andSecret:YOUR_APP_SECRET\n withCompletion:^(BOOL authenticated, NSError *error)\n{\n if (authenticated) { NSLog(@\"Authenticated OK.\"); }\n}];\n\nChirp *chirp = [[Chirp alloc] initWithIdentifier:@\"a7cnn9c0li\"];\n\n[chirp chirp];", "language": "objectivec" }, { "code": "ChirpSDK chirpSDK = new ChirpSDK(context, API_KEY, API_SECRET);\nchirpSDK.play(new ShortCode(\"parrotbill\"));\n", "language": "java" } ] } [/block] You'll notice that this string is quite short. Chirp's native audio protocol supports strings of 10 characters long, drawn from the alphabet `[0-9a-v]`. Read more about the [Anatomy of a Chirp](doc:chirps-shortcodes). It's possible to send more data within a chirp, but that requires speaking to us about a custom protocol. Read more about [Chirp Protocols](doc:chirp-protocols). Receiving a chirp is just as straightforward: [block:code] { "codes": [ { "code": "[[ChirpSDK sdk] setChirpHeardBlock:^(Chirp *chirp, NSError *error)\n{\n NSLog(@\"Heard chirp: %@\", chirp.identifier);\n}];", "language": "objectivec" }, { "code": "chirpSDK.setListener(new ChirpSDKListener() {\n\n @Override\n public void onChirpHeard(ShortCode shortCode) {\n Log.v(\"Chirp\", \"ShortCode received: \" + shortCode.getShortCode());\n }\n\n @Override\n public void onChirpError(ChirpError chirpError) {\n\n }\n});\n\nchirpSDK.startListening();", "language": "java" } ] } [/block] [block:api-header] { "type": "basic", "title": "4. Chirping more complex data" } [/block] For internet-connected devices, Chirp can seamlessly send arbitrary JSON data structures by sending them to our network API. This generates an identifier that uniquely identifies your data structure. [block:code] { "codes": [ { "code": "[[ChirpSDK sdk] createChirpWithDictionary:@{ @\"key\" : @\"value\" }\n withCompletion:^(Chirp *chirp, NSError *error)\n{\n if (chirp)\n {\n NSLog(@\"Created a chirp with identifier: %@\", chirp.identifier);\n [chirp chirp];\n }\n}];", "language": "objectivec" }, { "code": "JSONObject jsonObj = new JSONObject();\njsonObj.put(\"key\", \"value\");\njsonObj.put(\"more\", \"data\");\n\nChirp chirp = new Chirp(jsonObj);\nchirpSDK.create(chirp, new CallbackCreate() {\n\n @Override\n public void onCreateResponse(ShortCode shortCode) {\n \t\tLog.v(\"Chirp\", \"ShortCode received: \" + shortCode.getShortCode());\n }\n\n @Override\n public void onCreateError(ChirpError chirpError) {\n\n }\n});", "language": "java" } ] } [/block]