Skip to content

Commit 85a5b4b

Browse files
Merge pull request #123 from appwrite/dev
feat: Android SDK update for version 24.1.0
2 parents 12b2ae4 + 1331f09 commit 85a5b4b

49 files changed

Lines changed: 1933 additions & 382 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Check out code
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1515
- name: Set up JDK 17
16-
uses: actions/setup-java@v1
16+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
1717
with:
18+
distribution: temurin
1819
java-version: 17
1920
- name: Prepare environment
2021
env:

CHANGELOG.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
# Change Log
22

3+
## 24.1.0
4+
5+
* Added: Realtime `presences` channel and `RealtimePresence` types for presence subscriptions
6+
* Added: `Advisor` and `Presences` services
7+
* Added: `Insight`, `Presence`, and `Report` models with list variants
8+
* Added: `fusionauth`, `keycloak`, and `kick` providers to `OAuthProvider` enum
9+
* Updated: Migrated Gradle build files to Kotlin DSL (`build.gradle.kts`)
10+
* Updated: `X-Appwrite-Response-Format` header to `1.9.5`
11+
312
## 24.0.0
413

5-
* Breaking: Added `unsubscribe()`, `update()`, and `close()` for Realtime subscription lifecycle.
6-
* Added: Added `userPhone` to the `Membership` model.
7-
* Updated: Updated `X-Appwrite-Response-Format` header to `1.9.2`.
14+
* Breaking: Added `unsubscribe()`, `update()`, and `close()` to Realtime subscriptions
15+
* Added: Added `userPhone` field to `Membership` model
16+
* Updated: Updated `X-Appwrite-Response-Format` header to `1.9.2`
817

918
## 23.1.0
1019

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-android.svg?color=green&style=flat-square)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-android.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-1.9.2-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.9.5-blue.svg?style=flat-square)
66
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
77
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
88
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
@@ -38,7 +38,7 @@ repositories {
3838
Next, add the dependency to your project's `build.gradle(.kts)` file:
3939

4040
```groovy
41-
implementation("io.appwrite:sdk-for-android:24.0.0")
41+
implementation("io.appwrite:sdk-for-android:24.1.0")
4242
```
4343

4444
### Maven
@@ -49,7 +49,7 @@ Add this to your project's `pom.xml` file:
4949
<dependency>
5050
<groupId>io.appwrite</groupId>
5151
<artifactId>sdk-for-android</artifactId>
52-
<version>24.0.0</version>
52+
<version>24.1.0</version>
5353
</dependency>
5454
</dependencies>
5555
```

build.gradle

Lines changed: 0 additions & 33 deletions
This file was deleted.

build.gradle.kts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import java.util.Properties
2+
3+
plugins {
4+
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
5+
id("com.android.library") version "9.1.1" apply false
6+
id("com.android.application") version "9.1.1" apply false
7+
}
8+
9+
version = System.getenv("SDK_VERSION") ?: "0.0.0"
10+
11+
tasks.register<Delete>("clean") {
12+
delete(rootProject.layout.buildDirectory)
13+
}
14+
15+
val signingKeyId: String = System.getenv("SIGNING_KEY_ID") ?: ""
16+
val signingPassword: String = System.getenv("SIGNING_PASSWORD") ?: ""
17+
val signingSecretKeyRingFile: String = System.getenv("SIGNING_SECRET_KEY_RING_FILE") ?: ""
18+
val ossrhUsername: String = System.getenv("OSSRH_USERNAME") ?: ""
19+
val ossrhPassword: String = System.getenv("OSSRH_PASSWORD") ?: ""
20+
val sonatypeStagingProfileId: String = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: ""
21+
22+
val secretPropsFile = project.rootProject.file("local.properties")
23+
val localProperties = Properties().apply {
24+
if (secretPropsFile.exists()) {
25+
secretPropsFile.inputStream().use { load(it) }
26+
}
27+
}
28+
29+
extra["signing.keyId"] = signingKeyId.ifEmpty { localProperties.getProperty("signing.keyId", "") }
30+
extra["signing.password"] = signingPassword.ifEmpty { localProperties.getProperty("signing.password", "") }
31+
extra["signing.secretKeyRingFile"] = signingSecretKeyRingFile.ifEmpty { localProperties.getProperty("signing.secretKeyRingFile", "") }
32+
33+
nexusPublishing {
34+
repositories {
35+
sonatype {
36+
stagingProfileId.set(sonatypeStagingProfileId.ifEmpty { localProperties.getProperty("sonatypeStagingProfileId", "") })
37+
username.set(ossrhUsername.ifEmpty { localProperties.getProperty("ossrhUsername", "") })
38+
password.set(ossrhPassword.ifEmpty { localProperties.getProperty("ossrhPassword", "") })
39+
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
40+
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
41+
}
42+
}
43+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
```java
2+
import io.appwrite.Client;
3+
import io.appwrite.coroutines.CoroutineCallback;
4+
import io.appwrite.services.Advisor;
5+
6+
Client client = new Client(context)
7+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
8+
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
9+
10+
Advisor advisor = new Advisor(client);
11+
12+
advisor.getInsight(
13+
"<REPORT_ID>", // reportId
14+
"<INSIGHT_ID>", // insightId
15+
new CoroutineCallback<>((result, error) -> {
16+
if (error != null) {
17+
error.printStackTrace();
18+
return;
19+
}
20+
21+
Log.d("Appwrite", result.toString());
22+
})
23+
);
24+
25+
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
```java
2+
import io.appwrite.Client;
3+
import io.appwrite.coroutines.CoroutineCallback;
4+
import io.appwrite.services.Advisor;
5+
6+
Client client = new Client(context)
7+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
8+
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
9+
10+
Advisor advisor = new Advisor(client);
11+
12+
advisor.getReport(
13+
"<REPORT_ID>", // reportId
14+
new CoroutineCallback<>((result, error) -> {
15+
if (error != null) {
16+
error.printStackTrace();
17+
return;
18+
}
19+
20+
Log.d("Appwrite", result.toString());
21+
})
22+
);
23+
24+
```
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
```java
2+
import io.appwrite.Client;
3+
import io.appwrite.coroutines.CoroutineCallback;
4+
import io.appwrite.services.Advisor;
5+
6+
Client client = new Client(context)
7+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
8+
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
9+
10+
Advisor advisor = new Advisor(client);
11+
12+
advisor.listInsights(
13+
"<REPORT_ID>", // reportId
14+
List.of(), // queries (optional)
15+
false, // total (optional)
16+
new CoroutineCallback<>((result, error) -> {
17+
if (error != null) {
18+
error.printStackTrace();
19+
return;
20+
}
21+
22+
Log.d("Appwrite", result.toString());
23+
})
24+
);
25+
26+
```
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
```java
2+
import io.appwrite.Client;
3+
import io.appwrite.coroutines.CoroutineCallback;
4+
import io.appwrite.services.Advisor;
5+
6+
Client client = new Client(context)
7+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
8+
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
9+
10+
Advisor advisor = new Advisor(client);
11+
12+
advisor.listReports(
13+
List.of(), // queries (optional)
14+
false, // total (optional)
15+
new CoroutineCallback<>((result, error) -> {
16+
if (error != null) {
17+
error.printStackTrace();
18+
return;
19+
}
20+
21+
Log.d("Appwrite", result.toString());
22+
})
23+
);
24+
25+
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
```java
2+
import io.appwrite.Client;
3+
import io.appwrite.coroutines.CoroutineCallback;
4+
import io.appwrite.services.Presences;
5+
6+
Client client = new Client(context)
7+
.setEndpoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
8+
.setProject("<YOUR_PROJECT_ID>"); // Your project ID
9+
10+
Presences presences = new Presences(client);
11+
12+
presences.delete(
13+
"<PRESENCE_ID>", // presenceId
14+
new CoroutineCallback<>((result, error) -> {
15+
if (error != null) {
16+
error.printStackTrace();
17+
return;
18+
}
19+
20+
Log.d("Appwrite", result.toString());
21+
})
22+
);
23+
24+
```

0 commit comments

Comments
 (0)