-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(android): sign-in with google & magic-link & email (#9868)
- [chore(android): migrate to version catalog](16c0fb6) - [feat(android): integrate apollo](4dcf93b) - [fix(android): fix android email sign-in](752cf34) - [chore(android): add stable/canary environment](72a96bf) - [feat(android): set cookies for apollo client](7664cc4) - [feat(android): google & magic-link sign-in](c54ce3b) - [eat(android): change logo](8c5062a) - [chore(android): fix pipleline](4a68299) - [fix(android): rebase issues](c6858c5) - [docs(android): update README for compat with java 21](6eac3ba) - [fix(android): android pipeline](1103c87)
- Loading branch information
1 parent
cbb73d8
commit 2607e34
Showing
65 changed files
with
2,377 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+27.9 KB
packages/frontend/apps/android/App/app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/frontend/apps/android/App/app/src/main/java/app/affine/pro/service/AffineClient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package app.affine.pro.service | ||
|
||
import app.affine.pro.BuildConfig | ||
import app.affine.pro.service.interceptor.CookieInterceptor | ||
import com.apollographql.apollo.ApolloClient | ||
import com.apollographql.apollo.api.ApolloResponse | ||
import com.apollographql.apollo.api.Mutation | ||
import com.apollographql.apollo.api.Query | ||
import com.apollographql.apollo.api.Subscription | ||
|
||
object AffineClient { | ||
|
||
private val _client: ApolloClient by lazy { | ||
ApolloClient.Builder().serverUrl(BuildConfig.BASE_URL) | ||
.addHttpInterceptor(CookieInterceptor) | ||
.build() | ||
} | ||
|
||
suspend fun <D : Query.Data> query(query: Query<D>): ApolloResponse<D> { | ||
return _client.query(query).execute() | ||
} | ||
|
||
suspend fun <D : Mutation.Data> mutation(mutation: Mutation<D>): ApolloResponse<D> { | ||
return _client.mutation(mutation).execute() | ||
} | ||
|
||
suspend fun <D : Subscription.Data> subscription(subscription: Subscription<D>): ApolloResponse<D> { | ||
return _client.subscription(subscription).execute() | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...pps/android/App/app/src/main/java/app/affine/pro/service/interceptor/CookieInterceptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package app.affine.pro.service.interceptor | ||
|
||
import android.webkit.CookieManager | ||
import app.affine.pro.BuildConfig | ||
import com.apollographql.apollo.api.http.HttpRequest | ||
import com.apollographql.apollo.network.http.HttpInterceptor | ||
import com.apollographql.apollo.network.http.HttpInterceptorChain | ||
|
||
object CookieInterceptor : HttpInterceptor { | ||
override suspend fun intercept( | ||
request: HttpRequest, | ||
chain: HttpInterceptorChain | ||
) = chain.proceed( | ||
request.newBuilder().addHeader( | ||
"Cookie", CookieManager.getInstance().getCookie(BuildConfig.BASE_URL) | ||
).build() | ||
) | ||
} |
Binary file removed
BIN
-7.52 KB
packages/frontend/apps/android/App/app/src/main/res/drawable-land-hdpi/splash.png
Binary file not shown.
Binary file removed
BIN
-3.95 KB
packages/frontend/apps/android/App/app/src/main/res/drawable-land-mdpi/splash.png
Binary file not shown.
Binary file removed
BIN
-9.03 KB
packages/frontend/apps/android/App/app/src/main/res/drawable-land-xhdpi/splash.png
Binary file not shown.
Binary file removed
BIN
-13.7 KB
...ages/frontend/apps/android/App/app/src/main/res/drawable-land-xxhdpi/splash.png
Binary file not shown.
Binary file removed
BIN
-17.3 KB
...ges/frontend/apps/android/App/app/src/main/res/drawable-land-xxxhdpi/splash.png
Binary file not shown.
Binary file removed
BIN
-7.75 KB
packages/frontend/apps/android/App/app/src/main/res/drawable-port-hdpi/splash.png
Binary file not shown.
Binary file removed
BIN
-4 KB
packages/frontend/apps/android/App/app/src/main/res/drawable-port-mdpi/splash.png
Binary file not shown.
Binary file removed
BIN
-9.64 KB
packages/frontend/apps/android/App/app/src/main/res/drawable-port-xhdpi/splash.png
Binary file not shown.
Binary file removed
BIN
-13 KB
...ages/frontend/apps/android/App/app/src/main/res/drawable-port-xxhdpi/splash.png
Binary file not shown.
Binary file removed
BIN
-17.1 KB
...ges/frontend/apps/android/App/app/src/main/res/drawable-port-xxxhdpi/splash.png
Binary file not shown.
34 changes: 0 additions & 34 deletions
34
packages/frontend/apps/android/App/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.