Follow this guide to fetch frontendtest-chataja data from your Kotlin app. The HttpURLConnection library will be used to fetch the database data through its REST API.
First you need to connect your app to the frontendtest-chataja database. It will authorize you to access this database API using your app keys. If your app doesn't have keys at Back4App yet, they will be generated during this process.
Now let's customize your query to fetch the data that you need!
In this guide we will use the org.json library to parse the returned data into a JSONObject. Make sure that you have this library's jar file imported to your project's referenced libraries.
Add the following code to your Kotlin app:
After running the app, you should see the following output in your app logs: