appwrite/docs/examples/1.8.x/client-android/java/account/update-prefs.md

27 lines
664 B
Markdown
Raw Normal View History

import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Account;
Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
Account account = new Account(client);
account.updatePrefs(
2025-09-05 12:00:39 +00:00
mapOf(
"language" to "en",
"timezone" to "UTC",
"darkTheme" to true
), // prefs
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);