{"id":20511189,"url":"https://github.com/lovoo/grpc-android-demo","last_synced_at":"2025-04-13T22:41:40.588Z","repository":{"id":34447406,"uuid":"38382117","full_name":"lovoo/grpc-android-demo","owner":"lovoo","description":"A minimal GRPC demo project with automatic generation of GRPC implementations from a proto file. Also includes a minimalistic server implementation. Designed to be a dead simple playground for your first GRPC on Android experiments.","archived":false,"fork":false,"pushed_at":"2015-07-03T13:13:49.000Z","size":1048,"stargazers_count":42,"open_issues_count":0,"forks_count":11,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-03-27T13:01:46.159Z","etag":null,"topics":["android","demo-app","grpc","lovoo"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-01T16:26:53.000Z","updated_at":"2024-12-04T19:48:18.000Z","dependencies_parsed_at":"2022-08-17T20:21:08.714Z","dependency_job_id":null,"html_url":"https://github.com/lovoo/grpc-android-demo","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/lovoo%2Fgrpc-android-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovoo%2Fgrpc-android-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovoo%2Fgrpc-android-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovoo%2Fgrpc-android-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovoo","download_url":"https://codeload.github.com/lovoo/grpc-android-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794504,"owners_count":21162613,"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","demo-app","grpc","lovoo"],"created_at":"2024-11-15T20:34:56.318Z","updated_at":"2025-04-13T22:41:40.521Z","avatar_url":"https://github.com/lovoo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"GRPC Android Demo\n=================\n\nAbout\n-----\n\nAs there seems to be currently no ready-to-go example for an Android application communicating with\na GRPC server which doesn't involve setting up a boatload of tools we decided to create this simple\ndemo project which contains a simple GRPC Java server and a matching Android client.\n\nChanging the protocol\n---------------------\n\nThe setup contains working code generation so feel free to change the proto file in lib_hello_grpc.\nUpon the next build the necessary classes are generated by the gradle grpc plugin. You'll just have\nto adapt the server and client code to the newly generated GRPC java classes. The compiler will \npoint you to the locations you have to change by means of compilitation errors.\n\nIt is advisable to clean the lib_hello_grpc module by calling `./gradlew :lib_hello_grpc:clean` after\nhaving removed or changed the name of a service or a message. This will remove all stale generated\nclasses and prevent compilation errors within the other generated classes.\n\nSetup\n-----\n\nThe following documentation assumes that you've installed Android Studio. Import the project via\ngradle.\n\nRunning the server\n------------------\n\nBy default the server runs on port 8080, but you may change that via command line arguments or\ndirectly in the code.\n\nRun the server from Android Studio by right-clicking the `Server.java` in the `lib_hello_grpc`\nmodule. This also creates a suitable run configuration which you can use to run the server again\nlater. After importing the project here will be errors which are automatically resolved during the first\nbuild via code generation. Make sure, that only one server instance runs at a time (at least if you\nattempt to use the same port).\n\nIncoming requests are logged on stdout.\n\nRunning the client\n------------------\n\nWhile importing the project to Android Studio via gradle the IDE automatically generates a run\nconfiguration for the app which you can use to install it on your device or emulator.\n\nIn the app first type in the hostname and the port of your server. Then click on the `HELLO SERVER!`\nbutton to execute a request against your GRPC server instance. In case of success the server will\nreply with `Hello Android`.\n\nIf you did everything correctly it should look something like this:\n\n\u003cimg src=\"https://raw.githubusercontent.com/Lovoo/grpc-android-demo/master/grpc-android-anim.gif\" width=\"540\" height=\"960\" /\u003e\n\nLicence\n-------\n\n    Copyright (c) 2015, LOVOO GmbH\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice, this\n      list of conditions and the following disclaimer.\n\n    * Redistributions in binary form must reproduce the above copyright notice,\n      this list of conditions and the following disclaimer in the documentation\n      and/or other materials provided with the distribution.\n\n    * Neither the name of LOVOO GmbH nor the names of its\n      contributors may be used to endorse or promote products derived from\n      this software without specific prior written permission.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOEVER\n    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovoo%2Fgrpc-android-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovoo%2Fgrpc-android-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovoo%2Fgrpc-android-demo/lists"}