0

I need to implement an ANDROID application which sends GPS data to kafka. I know it is possible to implement a Producer using kafka on Java but Kafka libraries does not work in Android. So I need to use a PROXY REST API. I tried to search online but I found very dispersed documentation about it and no example code for android using Rest API. Let's assume the endpoint is already configured correctly. I already took a look at https://docs.confluent.io/platform/current/tutorials/examples/clients/docs/rest-proxy.html#client-examples-rest-proxy but even there it is too dispersive and there are no codes for Android. Can anyone show me or point me to an example code to send a Json file every second to Kafka endpoint? In particular I am interested in knowing which libraries I need to import and the methods for sending the JSON. Thanks.

  • There are no examples "for Android" since the API docs are meant to show you the endpoints and request bodies and responses. There are far too many HTTP libraries to give examples for any of them. You can read the official Android documentation to find out how to build an HTTP request and get a response from **any API**. – OneCricketeer Nov 19 '21 at 17:28

0 Answers0