Skip to content

Commit 9b5e285

Browse files
committed
Release candidate for 1.5.x
1 parent 946cbe7 commit 9b5e285

File tree

244 files changed

+2720
-990
lines changed

Some content is hidden

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

244 files changed

+2720
-990
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
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)
99

10-
**This SDK is compatible with Appwrite server version 1.4.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-android/releases).**
10+
**This SDK is compatible with Appwrite server version 1.5.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-android/releases).**
1111

1212
Appwrite is an open-source backend as a service server that abstract and simplify 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)
1313

@@ -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:4.0.1")
41+
implementation("io.appwrite:sdk-for-android:5.0.0-rc.2")
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>4.0.1</version>
52+
<version>5.0.0-rc.2</version>
5353
</dependency>
5454
</dependencies>
5555
```

build.gradle

+5-6
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@ apply plugin: 'io.github.gradle-nexus.publish-plugin'
22

33
// Top-level build file where you can add configuration options common to all sub-projects/modules.
44
buildscript {
5-
ext.kotlin_version = "1.8.0"
5+
ext.kotlin_version = "1.9.10"
6+
67
version System.getenv("SDK_VERSION")
8+
79
repositories {
810
maven { url "https://plugins.gradle.org/m2/" }
911
google()
1012
mavenCentral()
1113
}
1214
dependencies {
13-
classpath "com.android.tools.build:gradle:4.2.2"
15+
classpath "com.android.tools.build:gradle:8.2.2"
1416
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
15-
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
16-
17-
// NOTE: Do not place your application dependencies here; they belong
18-
// in the individual module build.gradle files
17+
classpath "io.github.gradle-nexus:publish-plugin:1.3.0"
1918
}
2019
}
2120

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Account;
4+
import io.appwrite.enums.Type;
5+
6+
Client client = new Client(context)
7+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
8+
.setProject("5df5acd0d48c2"); // Your project ID
9+
10+
Account account = new Account(client);
11+
12+
account.addAuthenticator(
13+
type.TOTP,
14+
new CoroutineCallback<>((result, error) -> {
15+
if (error != null) {
16+
error.printStackTrace();
17+
return;
18+
}
19+
20+
Log.d("Appwrite", result.toString());
21+
})
22+
);

docs/examples/java/account/create-anonymous-session.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99
Account account = new Account(client);
1010

1111
account.createAnonymousSession(new CoroutineCallback<>((result, error) -> {
12-
if (error != null)
12+
if (error != null) {
1313
error.printStackTrace();
1414
return;
1515
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Account;
4+
5+
Client client = new Client(context)
6+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2"); // Your project ID
8+
9+
Account account = new Account(client);
10+
11+
account.createEmailPasswordSession(
12+
13+
"password",
14+
new CoroutineCallback<>((result, error) -> {
15+
if (error != null) {
16+
error.printStackTrace();
17+
return;
18+
}
19+
20+
Log.d("Appwrite", result.toString());
21+
})
22+
);

docs/examples/java/account/create-magic-u-r-l-session.md renamed to docs/examples/java/account/create-email-token.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Client client = new Client(context)
88

99
Account account = new Account(client);
1010

11-
account.createMagicURLSession(
11+
account.createEmailToken(
1212
"[USER_ID]",
1313
1414
new CoroutineCallback<>((result, error) -> {
@@ -19,4 +19,4 @@ account.createMagicURLSession(
1919

2020
Log.d("Appwrite", result.toString());
2121
})
22-
);
22+
);

docs/examples/java/account/create-j-w-t.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99
Account account = new Account(client);
1010

1111
account.createJWT(new CoroutineCallback<>((result, error) -> {
12-
if (error != null)
12+
if (error != null) {
1313
error.printStackTrace();
1414
return;
1515
}

docs/examples/java/account/create-email-session.md renamed to docs/examples/java/account/create-magic-u-r-l-token.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Client client = new Client(context)
88

99
Account account = new Account(client);
1010

11-
account.createEmailSession(
11+
account.createMagicURLToken(
12+
"[USER_ID]",
1213
13-
"password"
1414
new CoroutineCallback<>((result, error) -> {
1515
if (error != null) {
1616
error.printStackTrace();
@@ -19,4 +19,4 @@ account.createEmailSession(
1919

2020
Log.d("Appwrite", result.toString());
2121
})
22-
);
22+
);
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import io.appwrite.Client;
22
import io.appwrite.coroutines.CoroutineCallback;
33
import io.appwrite.services.Account;
4+
import io.appwrite.enums.OAuthProvider;
45

56
Client client = new Client(context)
67
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
@@ -9,7 +10,7 @@ Client client = new Client(context)
910
Account account = new Account(client);
1011

1112
account.createOAuth2Session(
12-
"amazon",
13+
OAuthProvider.AMAZON,
1314
new CoroutineCallback<>((result, error) -> {
1415
if (error != null) {
1516
error.printStackTrace();
@@ -18,4 +19,4 @@ account.createOAuth2Session(
1819

1920
Log.d("Appwrite", result.toString());
2021
})
21-
);
22+
);

docs/examples/java/account/create-phone-session.md renamed to docs/examples/java/account/create-phone-token.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Client client = new Client(context)
88

99
Account account = new Account(client);
1010

11-
account.createPhoneSession(
11+
account.createPhoneToken(
1212
"[USER_ID]",
13-
"+12065550100"
13+
"+12065550100",
1414
new CoroutineCallback<>((result, error) -> {
1515
if (error != null) {
1616
error.printStackTrace();
@@ -19,4 +19,4 @@ account.createPhoneSession(
1919

2020
Log.d("Appwrite", result.toString());
2121
})
22-
);
22+
);

docs/examples/java/account/create-phone-verification.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99
Account account = new Account(client);
1010

1111
account.createPhoneVerification(new CoroutineCallback<>((result, error) -> {
12-
if (error != null)
12+
if (error != null) {
1313
error.printStackTrace();
1414
return;
1515
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Account;
4+
5+
Client client = new Client(context)
6+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2"); // Your project ID
8+
9+
Account account = new Account(client);
10+
11+
account.createPushTarget(
12+
"[TARGET_ID]",
13+
"[IDENTIFIER]",
14+
new CoroutineCallback<>((result, error) -> {
15+
if (error != null) {
16+
error.printStackTrace();
17+
return;
18+
}
19+
20+
Log.d("Appwrite", result.toString());
21+
})
22+
);

docs/examples/java/account/create-recovery.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Account account = new Account(client);
1010

1111
account.createRecovery(
1212
13-
"https://example.com"
13+
"https://example.com",
1414
new CoroutineCallback<>((result, error) -> {
1515
if (error != null) {
1616
error.printStackTrace();
@@ -19,4 +19,4 @@ account.createRecovery(
1919

2020
Log.d("Appwrite", result.toString());
2121
})
22-
);
22+
);

docs/examples/java/account/update-phone-session.md renamed to docs/examples/java/account/create-session.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Client client = new Client(context)
88

99
Account account = new Account(client);
1010

11-
account.updatePhoneSession(
11+
account.createSession(
1212
"[USER_ID]",
13-
"[SECRET]"
13+
"[SECRET]",
1414
new CoroutineCallback<>((result, error) -> {
1515
if (error != null) {
1616
error.printStackTrace();
@@ -19,4 +19,4 @@ account.updatePhoneSession(
1919

2020
Log.d("Appwrite", result.toString());
2121
})
22-
);
22+
);

docs/examples/java/account/create-verification.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99
Account account = new Account(client);
1010

1111
account.createVerification(
12-
"https://example.com"
12+
"https://example.com",
1313
new CoroutineCallback<>((result, error) -> {
1414
if (error != null) {
1515
error.printStackTrace();
@@ -18,4 +18,4 @@ account.createVerification(
1818

1919
Log.d("Appwrite", result.toString());
2020
})
21-
);
21+
);

docs/examples/java/account/create.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ account.create(
2020

2121
Log.d("Appwrite", result.toString());
2222
})
23-
);
23+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Account;
4+
import io.appwrite.enums.Factor;
5+
6+
Client client = new Client(context)
7+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
8+
.setProject("5df5acd0d48c2"); // Your project ID
9+
10+
Account account = new Account(client);
11+
12+
account.create2FAChallenge(
13+
factor.TOTP,
14+
new CoroutineCallback<>((result, error) -> {
15+
if (error != null) {
16+
error.printStackTrace();
17+
return;
18+
}
19+
20+
Log.d("Appwrite", result.toString());
21+
})
22+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Account;
4+
import io.appwrite.enums.Type;
5+
6+
Client client = new Client(context)
7+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
8+
.setProject("5df5acd0d48c2"); // Your project ID
9+
10+
Account account = new Account(client);
11+
12+
account.deleteAuthenticator(
13+
type.TOTP,
14+
"[OTP]",
15+
new CoroutineCallback<>((result, error) -> {
16+
if (error != null) {
17+
error.printStackTrace();
18+
return;
19+
}
20+
21+
Log.d("Appwrite", result.toString());
22+
})
23+
);

docs/examples/java/account/delete-identity.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99
Account account = new Account(client);
1010

1111
account.deleteIdentity(
12-
"[IDENTITY_ID]"
12+
"[IDENTITY_ID]",
1313
new CoroutineCallback<>((result, error) -> {
1414
if (error != null) {
1515
error.printStackTrace();
@@ -18,4 +18,4 @@ account.deleteIdentity(
1818

1919
Log.d("Appwrite", result.toString());
2020
})
21-
);
21+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import io.appwrite.Client;
2+
import io.appwrite.coroutines.CoroutineCallback;
3+
import io.appwrite.services.Account;
4+
5+
Client client = new Client(context)
6+
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
7+
.setProject("5df5acd0d48c2"); // Your project ID
8+
9+
Account account = new Account(client);
10+
11+
account.deletePushTarget(
12+
"[TARGET_ID]",
13+
new CoroutineCallback<>((result, error) -> {
14+
if (error != null) {
15+
error.printStackTrace();
16+
return;
17+
}
18+
19+
Log.d("Appwrite", result.toString());
20+
})
21+
);

docs/examples/java/account/delete-session.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Client client = new Client(context)
99
Account account = new Account(client);
1010

1111
account.deleteSession(
12-
"[SESSION_ID]"
12+
"[SESSION_ID]",
1313
new CoroutineCallback<>((result, error) -> {
1414
if (error != null) {
1515
error.printStackTrace();
@@ -18,4 +18,4 @@ account.deleteSession(
1818

1919
Log.d("Appwrite", result.toString());
2020
})
21-
);
21+
);

0 commit comments

Comments
 (0)