{"id":22322714,"url":"https://github.com/keenlabs/keenclient-android-sample","last_synced_at":"2025-07-19T12:38:12.883Z","repository":{"id":5186581,"uuid":"6361295","full_name":"keenlabs/KeenClient-Android-Sample","owner":"keenlabs","description":"Sample Android app that uses the Keen IO Android SDK","archived":false,"fork":false,"pushed_at":"2023-10-04T07:06:42.000Z","size":1270,"stargazers_count":4,"open_issues_count":0,"forks_count":47,"subscribers_count":36,"default_branch":"master","last_synced_at":"2024-03-26T08:07:26.315Z","etag":null,"topics":["analytics","android","android-sdk","java","sample","sample-android"],"latest_commit_sha":null,"homepage":"https://keen.io","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"joyent/libuv","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keenlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-23T22:43:20.000Z","updated_at":"2024-03-26T08:07:26.316Z","dependencies_parsed_at":"2022-09-19T02:30:20.488Z","dependency_job_id":null,"html_url":"https://github.com/keenlabs/KeenClient-Android-Sample","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/keenlabs%2FKeenClient-Android-Sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenlabs%2FKeenClient-Android-Sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenlabs%2FKeenClient-Android-Sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keenlabs%2FKeenClient-Android-Sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keenlabs","download_url":"https://codeload.github.com/keenlabs/KeenClient-Android-Sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228024133,"owners_count":17857628,"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":["analytics","android","android-sdk","java","sample","sample-android"],"created_at":"2024-12-04T01:08:20.415Z","updated_at":"2024-12-04T01:08:20.976Z","avatar_url":"https://github.com/keenlabs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sample Android App Using Keen\n=============================\n\nThis is a sample Android App that uses the [Keen IO Java/Android SDK](https://github.com/keenlabs/KeenClient-Java)\nto capture and upload events to Keen IO.\n\n## Building the Sample App\n\nFirst, clone the repo:\n\n`git clone git@github.com:keenlabs/KeenClient-Android-Sample.git`\n\nNext, you will need to have a Keen IO project to send events to. Create one via the Keen IO web interface if you haven't already.\n\nOpen the file `app/src/main/res/values/keen.xml` and enter the project ID/read key/write key for your project, as well as your\ncollection name.\n\nBuilding the sample then depends on your build tools.\n\n### Android Studio (Recommended)\n\n(These instructions were tested with Android Studio version 2.2.2, 2.2.3, 2.3, and 2.3.2)\n\n* Open Android Studio and select `File-\u003eOpen...` or from the Android Launcher select `Import project (Eclipse ADT, Gradle, etc.)` and navigate to the root directory of your project.\n* Select the directory or drill in and select the file `build.gradle` in the cloned repo.\n* Click 'OK' to open the the project in Android Studio.\n* A Gradle sync should start, but you can force a sync and build the 'app' module as needed.\n\n### Gradle (command line)\n\n* Build the APK: `./gradlew build`\n\n### Eclipse\n\n* Download the latest Android SDK from [Maven Central](http://repo1.maven.org/maven2/io/keen/keen-client-api-android)\n  * Note: We publish both an AAR and a JAR; you may use whichever is more convenient based on your infrastructure and needs.\n\n\n## Running the Sample App\n\nConnect an Android device to your development machine.\n\n### Android Studio\n\n* Select `Run -\u003e Run 'app'` (or `Debug 'app'`) from the menu bar\n* Select the device you wish to run the app on and click 'OK'\n\n### Gradle\n\n* Install the debug APK on your device `./gradlew installDebug`\n* Start the APK: `\u003cpath to Android SDK\u003e/platform-tools/adb -d shell am start io.keen.client.android.example/io.keen.client.android.example.MyActivity`\n\n\n## Using the Sample App\n\nEach time you press the \"Send Event!\" button the sample app queues an event to be sent to the Keen API with an increasing\ncounter. Note that the events will not actually be sent until the activity's `onPause` method is called, so you will need\nto exit the app or otherwise cause `onPause` to be called to cause events to be sent. (Rotating your device to cause an\norientation change is one trick, but you can also just exit the app and re-open it.)\n\nYou can press the \"Query!\" button to issue a count query on the same collection with a timeframe of `this_24_hours`. The\nresult will be shown in a toast.\n\nYou should also be able to see the events show up in queries issued via the API or the web UI for your project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeenlabs%2Fkeenclient-android-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeenlabs%2Fkeenclient-android-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeenlabs%2Fkeenclient-android-sample/lists"}