Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: android tutorial #190

Merged
merged 16 commits into from
Jan 17, 2024
Merged

feat: android tutorial #190

merged 16 commits into from
Jan 17, 2024

Conversation

loks0n
Copy link
Member

@loks0n loks0n commented Oct 4, 2023

No description provided.

@loks0n loks0n requested a review from gewenyu99 October 4, 2023 12:26
@vercel
Copy link

vercel bot commented Oct 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 17, 2024 3:01am

Copy link
Contributor

@gewenyu99 gewenyu99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes 😄

src/routes/docs/tutorials/android/step-1/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/tutorials/android/step-3/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/tutorials/android/step-4/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/tutorials/android/step-4/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/tutorials/android/step-5/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/tutorials/android/step-6/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/tutorials/android/step-7/+page.markdoc Outdated Show resolved Hide resolved
@gewenyu99
Copy link
Contributor

I just noticed. @loks0n C'mon set a good example, why no description?

Copy link
Contributor

@gewenyu99 gewenyu99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@loks0n More comments <3

The Appwrite docs, just like Appwrite, is completely open sourced.
This means, anyone can help improve them and add new guides and tutorials.
{% only_dark %}
![Create project screen](/images/docs/tutorials/dark/idea-tracker.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@loks0n What does ideas tracker look like? Not like this right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2023-10-05 at 4 19 13 PM

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed for now will send you screenshot if you able to format it 🙏

src/routes/docs/tutorials/android/step-4/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/tutorials/android/step-4/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/tutorials/android/step-5/+page.markdoc Outdated Show resolved Hide resolved
Copy link
Contributor

@gewenyu99 gewenyu99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@loks0n If you follow with the code till Main activity step, you'll get slapped with a kotlin.UninitializedPropertyAccessException: lateinit property account has not been initialized

Do you know what this is?

Edit: missing an init line account = AccountService(client); in Appwrite.kt.

Copy link
Contributor

@gewenyu99 gewenyu99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2023-10-06 at 4 13 54 PM

Also, email instead of username?

@gewenyu99
Copy link
Contributor

Also @loks0n I know you're gonna hate me for this, but some simple error handling? When I do invalid email and stuff, how much code is it to throw a snackbar or something?

@gewenyu99
Copy link
Contributor

Screenshot 2023-10-06 at 4 38 16 PM

@loks0n some of these lines, do you think we should add the comments above instead? Maybe even with a 👇 emoji in comment, it's difficult to see this on the side

| userId | String | Yes |
| title | String | Yes |
| description | String | No |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@loks0n missing some steps for permissions ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have this for other tutorials. Do we want a screenshot?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have this for other tutorials. Do we want a screenshot?

Hmmm yeah I don't think so. We don't need screenshots, just let them know what permissions need to be added with a table, I'll copy to the other tutorials :)

Create a new collection with the following attributes:
| Field | Type | Required |
|-------------|--------|----------|
| userId | String | Yes |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to also set permissions so users would only see their own ideas?

@gewenyu99
Copy link
Contributor

Rest works great! Final few comments I think.

@loks0n
Copy link
Member Author

loks0n commented Oct 11, 2023

Also @loks0n I know you're gonna hate me for this, but some simple error handling? When I do invalid email and stuff, how much code is it to throw a snackbar or something?

Screenshot 2023-10-06 at 4 38 16 PM @loks0n some of these lines, do you think we should add the comments above instead? Maybe even with a 👇 emoji in comment, it's difficult to see this on the side

done & done

@loks0n loks0n requested a review from gewenyu99 October 11, 2023 12:28
@gewenyu99
Copy link
Contributor

@loks0n Let me try this later this week, prio is community PRs right now.

@TorstenDittmann TorstenDittmann added the documentation Improvements or additions to documentation label Oct 18, 2023
Copy link

render bot commented Jan 15, 2024

Copy link
Contributor

@gewenyu99 gewenyu99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made changes

implementation ("io.appwrite:sdk-for-android:4.0.0")
```

In case you need to create OAuth 2 sessions in the future, the following activity needs to be added inside the `<application>` tag, along side the existing `<activity>` tags in your [AndroidManifest.xml](https://github.com/appwrite/playground-for-flutter/blob/master/android/app/src/main/AndroidManifest.xml).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this pointing to Flutter? @loks0n

@gewenyu99 gewenyu99 changed the base branch from main to feat-nuxt-tutorial January 16, 2024 00:18
src/routes/docs/tutorials/android/step-2/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/tutorials/android/step-3/+page.markdoc Outdated Show resolved Hide resolved
}

suspend fun logout() {
account.deleteSession("current")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
account.deleteSession("current")
try {
account.deleteSession("current")
} catch (ex: AppwriteException) {
// Handle logout failure
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abnegate We're gonna avoid this for sake of brevity in this tutorial for now.

src/routes/docs/tutorials/android/step-6/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/tutorials/android/step-6/+page.markdoc Outdated Show resolved Hide resolved
@gewenyu99 gewenyu99 merged commit 4e32437 into feat-nuxt-tutorial Jan 17, 2024
2 checks passed
This was referenced Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants