Appwrite INIT SDK for Android



    Khalid Khan

    Appwrite companion cookbook

    Initialize your SDK code with your project ID, which can be found in your project settings page.

    Before starting to send any API calls to your new Appwrite instance, make sure your Android emulators has network access to the Appwrite server hostname or IP address.

    When trying to connect to Appwrite from an emulator or a mobile device, localhost is the hostname for the device or emulator and not your local Appwrite instance. You should replace localhost with your private IP as the Appwrite endpoint's hostname. You can also use a service like ngrok to proxy the Appwrite API.


    import io.appwrite.Client
    val client = Client(context)
      .setEndpoint("apiendpoint") // Your API Endpoint
      .setProject("Project_ID") // Your project ID
      .setSelfSigned(status: true) // For self signed certificates, only use for development
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.