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

29 lines
671 B
Markdown
Raw Normal View History

```java
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(
Map.of(
"language", "en",
"timezone", "UTC",
"darkTheme", true
2025-09-05 12:00:39 +00:00
), // prefs
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}
Log.d("Appwrite", result.toString());
})
);
```