Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 16 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
# Change Log

## 29.1.0-rc.3

* Added: first background subscription auto-requests `POST_NOTIFICATIONS` (Android 13+) from the visible activity
* Fixed: `onOpen`/`onClose` callbacks fire correctly when joining or leaving the background host
* Fixed: notification taps are recorded after launching the app, so tap-opened screens land on top

## 29.1.0-rc.2

* Added: `getInitialNotification()`, `onNotificationOpened()`, and the `PushNotificationOpened` data class (topic + data)
## 30.0.0

* Breaking: `Oauth2` `resource` parameter is now `List<String>` instead of `String`
* Breaking: `Teams.createMembership` takes `membershipId` after `roles`; positional callers must update
* Added: `Account.listPasskeys`, `createPasskey`, `getPasskey`, `updatePasskey` and `deletePasskey`
* Added: `Account.updatePasskeyVerification` to finish registering a passkey
* Added: `Account.createPasskeyToken` and `Account.updatePasskeyToken` for passkey sign-in
* Added: `Passkey`, `PasskeyList`, `PasskeyChallenge` and `TokenSecret` models
* Added: `Analytics` service with `createEvent`
* Added: `state` parameter to `Account.createOAuth2Session` and `Account.createOAuth2Token`
* Added: background push notifications render the server `notification` title, body, and image
* Added: `getInitialNotification()`, `onNotificationOpened()` and the `PushNotificationOpened` data class
* Added: `onOpen`/`onClose` callbacks now fire for background push connections
* Added: first background subscription requests `POST_NOTIFICATIONS` (Android 13+) from the visible activity
* Added: push auth falls back to the client's cookie-store session
* Fixed: a foreground message with no live callback now still posts a notification
* Updated: notification taps route through an internal `PushOpenActivity`

## 29.1.0-rc.1

* Updated: regenerated with sdk-generator 5.5.0; no SDK code changes

## 29.1.0-rc.0

* Added: optional `method` param on `Client.chunkedUpload()` to set the upload HTTP method
* Added: background push notifications render the server `notification` title, body, and image
* Fixed: response models fill missing fields from spec defaults instead of throwing
* Updated: `Avatars.updatePhoto()` uploads via `PUT`
* Updated: SDK now targets Appwrite 2.4 (`x-appwrite-response-format: 2.4.0`)
* Fixed: a foreground message with no live callback now still posts a notification
* Fixed: an exactly-chunk-sized file uploads in a single request

## 29.0.0
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-android.svg?color=green&style=flat-square)
![License](https://img.shields.io/github/license/appwrite/sdk-for-android.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-2.3.0-blue.svg?style=flat-square)
![Version](https://img.shields.io/badge/api%20version-2.4.0-blue.svg?style=flat-square)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

**This SDK targets Appwrite server version 2.3.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-android/releases) when APIs differ.
**This SDK targets Appwrite server version 2.4.x as shipped on Appwrite Cloud.** Self-hosted releases can lag behind Cloud — if you run an older self-hosted build, use a matching older SDK from [previous releases](https://github.com/appwrite/sdk-for-android/releases) when APIs differ.

Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Android SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

Expand Down Expand Up @@ -38,7 +38,7 @@ repositories {
Next, add the dependency to your project's `build.gradle(.kts)` file:

```groovy
implementation("io.appwrite:sdk-for-android:29.1.0-rc.3")
implementation("io.appwrite:sdk-for-android:30.0.0")
```

### Maven
Expand All @@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
<dependency>
<groupId>io.appwrite</groupId>
<artifactId>sdk-for-android</artifactId>
<version>29.1.0-rc.3</version>
<version>30.0.0</version>
</dependency>
</dependencies>
```
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/account/create-o-auth-2-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ account.createOAuth2Session(
"https://example.com", // success (optional)
"https://example.com", // failure (optional)
List.of(), // scopes (optional)
"<STATE>", // state (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions docs/examples/java/account/create-o-auth-2-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ account.createOAuth2Token(
"https://example.com", // success (optional)
"https://example.com", // failure (optional)
List.of(), // scopes (optional)
"<STATE>", // state (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
Expand Down
22 changes: 22 additions & 0 deletions docs/examples/java/account/create-passkey-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
```java
import android.util.Log;

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.createPasskeyToken(new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
}));
```
27 changes: 27 additions & 0 deletions docs/examples/java/account/create-passkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
```java
import android.util.Log;

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.createPasskey(
"<PASSKEY_ID>", // passkeyId (optional)
"<NAME>", // name (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
26 changes: 26 additions & 0 deletions docs/examples/java/account/delete-passkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
```java
import android.util.Log;

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.deletePasskey(
"<PASSKEY_ID>", // passkeyId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
26 changes: 26 additions & 0 deletions docs/examples/java/account/get-passkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
```java
import android.util.Log;

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.getPasskey(
"<PASSKEY_ID>", // passkeyId
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
27 changes: 27 additions & 0 deletions docs/examples/java/account/list-passkeys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
```java
import android.util.Log;

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.listPasskeys(
List.of(), // queries (optional)
false, // total (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
27 changes: 27 additions & 0 deletions docs/examples/java/account/update-passkey-token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
```java
import android.util.Log;

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.updatePasskeyToken(
"<CHALLENGE_ID>", // challengeId
Map.of("a", "b"), // credential
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
27 changes: 27 additions & 0 deletions docs/examples/java/account/update-passkey-verification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
```java
import android.util.Log;

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.updatePasskeyVerification(
"<PASSKEY_ID>", // passkeyId
Map.of("a", "b"), // credential
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
27 changes: 27 additions & 0 deletions docs/examples/java/account/update-passkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
```java
import android.util.Log;

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.updatePasskey(
"<PASSKEY_ID>", // passkeyId
"<NAME>", // name
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
38 changes: 38 additions & 0 deletions docs/examples/java/analytics/create-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
```java
import android.util.Log;

import io.appwrite.Client;
import io.appwrite.coroutines.CoroutineCallback;
import io.appwrite.services.Analytics;

Client client = new Client(context)
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
.setProject("<YOUR_PROJECT_ID>"); // Your project ID

Analytics analytics = new Analytics(client);

analytics.createEvent(
"<PROPERTY_ID>", // propertyId
"<NAME>", // name
"https://example.com", // url
"<DOMAIN>", // domain (optional)
"<REFERRER>", // referrer (optional)
0L, // screenWidth (optional)
"<SESSION_HASH>", // sessionHash (optional)
0L, // scrollDepth (optional)
0L, // engagementTime (optional)
List.of(), // props (optional)
"<USER_ID>", // userId (optional)
"<IP>", // ip (optional)
"<USER_AGENT>", // userAgent (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
return;
}

Log.d("Appwrite", result.toString());
})
);

```
2 changes: 1 addition & 1 deletion docs/examples/java/oauth2/authorize-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ oauth2.authorizePost(
"<PROMPT>", // prompt (optional)
0L, // max_age (optional)
"<AUTHORIZATION_DETAILS>", // authorization_details (optional)
"", // resource (optional)
List.of(), // resource (optional)
"<AUDIENCE>", // audience (optional)
"<REQUEST_URI>", // request_uri (optional)
new CoroutineCallback<>((result, error) -> {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/oauth2/authorize.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ oauth2.authorize(
"<PROMPT>", // prompt (optional)
0L, // max_age (optional)
"<AUTHORIZATION_DETAILS>", // authorization_details (optional)
"", // resource (optional)
List.of(), // resource (optional)
"<AUDIENCE>", // audience (optional)
"<REQUEST_URI>", // request_uri (optional)
new CoroutineCallback<>((result, error) -> {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/oauth2/create-device-authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ oauth2.createDeviceAuthorization(
"<CLIENT_ID>", // client_id (optional)
"<SCOPE>", // scope (optional)
"<AUTHORIZATION_DETAILS>", // authorization_details (optional)
"", // resource (optional)
List.of(), // resource (optional)
"<AUDIENCE>", // audience (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/oauth2/create-par.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ oauth2.createPAR(
"<PROMPT>", // prompt (optional)
0L, // max_age (optional)
"<AUTHORIZATION_DETAILS>", // authorization_details (optional)
"", // resource (optional)
List.of(), // resource (optional)
"<AUDIENCE>", // audience (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/java/oauth2/create-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ oauth2.createToken(
"<CLIENT_SECRET>", // client_secret (optional)
"<CODE_VERIFIER>", // code_verifier (optional)
"https://example.com", // redirect_uri (optional)
"", // resource (optional)
List.of(), // resource (optional)
"<AUDIENCE>", // audience (optional)
new CoroutineCallback<>((result, error) -> {
if (error != null) {
Expand Down
Loading
Loading