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

Quiltthub webview example app and Kotlin Auth API #9

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 28 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,42 @@
android:name=".QuilttConnectorActivity"
android:launchMode="singleTop"
android:exported="true">
<tools:validation testUrl="https://www.quiltthub.com/mobile/reconnect" />
<tools:validation testUrl="https://www.quiltthub.com/mobile/connect" />

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="quilttandroidexample"
<data
android:scheme="quilttandroidexample"
android:host="open.kotlin.app" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="https" />
<data android:host="www.quiltthub.com" />
<data android:pathPattern="/mobile/connect" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:scheme="https"
android:host="www.quiltthub.com"
android:pathPattern="/mobile/reconnect" />
<data android:host="www.quiltthub.com" />
<data android:pathPattern="/mobile/reconnect" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
Expand Down

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions app_jetpack_compose/src/main/res/values/strings.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ plugins {
}

android {
namespace = "app.quiltt.app_jetpack_compose"
namespace = "app.quiltt.app_quiltthub_webview_example"
compileSdk = 34

defaultConfig {
applicationId = "app.quiltt.app_jetpack_compose"
applicationId = "app.quiltt.app_quiltthub_webview_example"
minSdk = 26
targetSdk = 34
versionCode = 1
Expand All @@ -18,6 +18,15 @@ android {
vectorDrawables {
useSupportLibrary = true
}

buildFeatures {
buildConfig = true
}

val ingressConnectorId = System.getenv("MOBILE_INGRESS_CONNECTOR_ID")
val addConnectorId = System.getenv("MOBILE_ADD_CONNECTOR_ID")
buildConfigField("String", "INGRESS_CONNECTOR_ID", "\"$ingressConnectorId\"")
buildConfigField("String", "ADD_CONNECTOR_ID", "\"$addConnectorId\"")
}

buildTypes {
Expand Down Expand Up @@ -70,6 +79,8 @@ dependencies {
debugImplementation("androidx.compose.ui:ui-test-manifest")

implementation("androidx.core:core-splashscreen:1.0.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9")
implementation("androidx.browser:browser:1.4.0")
implementation(project(":connector"))
// Enable below to use the published version
// implementation("app.quiltt:connector:<VERSION>")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package app.quiltt.app_jetpack_compose
package app.quiltt.app_quiltthub_webview_example

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,45 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@drawable/quiltt_app_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@drawable/quiltt_app_icon"
android:supportsRtl="true"
android:theme="@style/Theme.App.First">
<activity
android:name=".QuilttHubActivity"
android:exported="true"
android:label="@string/title_activity_quiltt_hub"
android:theme="@style/Theme.QuilttConnector"></activity>
<activity
android:name=".QuilttConnectorActivity"
android:launchMode="singleTop"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/Theme.QuilttConnector">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<tools:validation testUrl="https://quiltt.app/mobile/hub/connect" />

<data android:scheme="quilttandroidexample"
android:host="open.kotlin.app" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:label="@string/app_name"
android:launchMode="singleTop"
android:theme="@style/Theme.App.First">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />


<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>


</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package app.quiltt.app_quiltthub_webview_example

object AppConfig {
val ingressConnectorId = BuildConfig.INGRESS_CONNECTOR_ID
val addConnectorId = BuildConfig.ADD_CONNECTOR_ID
val oauthRedirectUrl = "https://quiltt.app/mobile/hub/reconnect"
}
Loading