ThreadCount Community edition

Uniform stock management for healthcare linen rooms. Licensed under the GNU AGPL v3.
This commit is contained in:
ThreadCount
2026-09-13 08:45:19 +10:00
commit 1bc2de655a
505 changed files with 56223 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
/build/*
!/build/.npmkeep
+116
View File
@@ -0,0 +1,116 @@
apply plugin: 'com.android.application'
// Release signing. The keystore and its password live in ~/threadcount-keys, outside the repo —
// nothing secret is ever committed. Without that file the release build is simply unsigned, so a
// fresh clone still builds a debug APK.
def keystorePropsFile = file("${System.getProperty('user.home')}/threadcount-keys/keystore.properties")
def keystoreProps = new Properties()
if (keystorePropsFile.exists()) {
keystorePropsFile.withInputStream { keystoreProps.load(it) }
}
android {
namespace "tech.threadcount.app"
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "tech.threadcount.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
// Play permanently reserves a version code the moment a bundle is uploaded, even to a
// discarded draft — it can never be reused. Bump this for EVERY upload, not every release.
// 1 was spent on the build with the missing camera permission; 2 on the one before
// onboarding was bundled. 3, 4 and 5 went to Play as drafts — a code is reserved the
// moment Play ingests a bundle, warnings and all. 6 adds the mapping file and the native
// debug symbols Play asked for.
versionCode 9
versionName "1.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
signingConfigs {
release {
if (keystoreProps['storeFile']) {
storeFile file(keystoreProps['storeFile'])
storePassword keystoreProps['storePassword']
keyAlias keystoreProps['keyAlias']
keyPassword keystoreProps['keyPassword']
}
}
}
buildTypes {
release {
if (keystoreProps['storeFile']) {
signingConfig signingConfigs.release
}
// R8 shrinks and obfuscates, and Gradle folds the resulting mapping.txt into the
// bundle, which is what lets Play symbolicate a stack trace instead of showing
// a.b.c(). Capacitor ships its plugin keep-rules as consumerProguardFiles, so the
// classes the bridge loads reflectively survive; proguard-rules.pro pins the rest.
//
// Resource shrinking is deliberately left off: the onboarding splash and welcome are
// plain files under assets/, which resource shrinking never inspects, so it would
// trade a real risk for almost no bytes.
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// Play warns that a bundle with native code has no debug symbols. ThreadCount has no
// native code of its own: all three .so files arrive pre-stripped inside Google's
// MLKit and CameraX AARs, and llvm-objcopy --only-keep-debug pulls zero .debug_* and
// zero .symtab sections out of them. So this currently emits nothing, and there is
// nothing it could emit — the warning is unfixable rather than unfixed. It stays
// configured so that the day ThreadCount does ship its own native code, the symbols
// go with it without anyone having to remember.
ndk {
debugSymbolLevel 'FULL'
}
}
}
// Devices from Android 15 can run 16 KB memory pages, and Play refuses uploads whose native
// libraries are only 4 KB-aligned. Uncompressed + page-aligned .so files satisfy both.
packaging {
jniLibs {
useLegacyPackaging false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
// WebViewCompat / WebViewFeature, for MainActivity.giveTheSiteTheBridge(). The Capacitor
// module has this as an implementation dependency, which does not reach this module.
implementation "androidx.webkit:webkit:$androidxWebkitVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}
apply from: 'capacitor.build.gradle'
try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
+21
View File
@@ -0,0 +1,21 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-mlkit-barcode-scanning')
implementation project(':capacitor-browser')
implementation project(':capacitor-haptics')
}
if (hasProperty('postBuildExtras')) {
postBuildExtras()
}
+44
View File
@@ -0,0 +1,44 @@
# R8 rules for the ThreadCount shell.
#
# Capacitor's own AAR already contributes consumerProguardFiles that keep anything extending
# com.getcapacitor.Plugin and the @CapacitorPlugin / @PluginMethod members. These rules cover the
# things that sit outside that net — everything the bridge, the WebView or the manifest reaches by
# name rather than by a reference R8 can see.
#
# The cost of getting this wrong is a build that installs and then fails the moment someone scans,
# so the bias here is deliberately towards keeping too much: the bundle is 15 MB of native
# libraries, and none of what follows is where the size is.
# The plugins named in assets/capacitor.plugins.json. Capacitor resolves these by string at
# startup, so R8 sees no reference to them at all.
-keep class io.capawesome.capacitorjs.plugins.mlkit.barcodescanning.** { *; }
-keep class com.capacitorjs.plugins.haptics.** { *; }
# The bridge, its WebView plumbing, and the annotations that drive plugin dispatch.
-keep class com.getcapacitor.** { *; }
-keep interface com.getcapacitor.** { *; }
-keep @interface com.getcapacitor.** { *; }
# Anything the WebView calls from JavaScript. proguard-android.txt carries this rule too; it is
# repeated here because losing it silently breaks every call from the page into the app.
-keepclassmembers class * {
@android.webkit.JavascriptInterface <methods>;
}
# The activity is named in AndroidManifest.xml, and it subclasses BridgeWebViewClient to keep the
# back button honest.
-keep class tech.threadcount.app.** { *; }
# MLKit resolves its barcode models and CameraX its implementation classes reflectively. Both ship
# consumer rules of their own; these are belt and braces on the paths that actually run here.
-keep class com.google.mlkit.** { *; }
-keep class com.google.android.gms.internal.mlkit_vision_barcode.** { *; }
-dontwarn com.google.mlkit.**
# Keep source file and line numbers in stack traces, and tell Play's symbolicator where to look.
# Without these a crash report names the class but not the line that threw.
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile
# Annotations drive both Capacitor's dispatch and AndroidX's lifecycle wiring.
-keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod
@@ -0,0 +1,26 @@
package com.getcapacitor.myapp;
import static org.junit.Assert.*;
import android.content.Context;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.getcapacitor.app", appContext.getPackageName());
}
}
+56
View File
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="false"
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
</provider>
</application>
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Reading a barcode with the continuous scanner runs CameraX in this process, which needs the
camera permission. Without it hands-free counting fails at runtime while single scans, which
Play Services handles in its own UI, still work — a confusing half-broken state. -->
<uses-permission android:name="android.permission.CAMERA" />
<!-- Declaring the permission would otherwise make a camera mandatory and hide the app from
camera-less tablets. Scanning is one feature, not the whole product: a counter tablet
without a camera can still issue, receive and read reports. -->
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
</manifest>
@@ -0,0 +1,169 @@
package tech.threadcount.app;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.util.Log;
import androidx.activity.OnBackPressedCallback;
import androidx.webkit.WebViewCompat;
import androidx.webkit.WebViewFeature;
import com.getcapacitor.Bridge;
import com.getcapacitor.BridgeActivity;
import com.getcapacitor.BridgeWebViewClient;
import com.getcapacitor.JSExport;
import com.getcapacitor.PluginHandle;
import java.lang.reflect.Field;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
/**
* Back navigation.
*
* Capacitor 6 leaves the back button alone, and nothing else was handling it, so back finished the
* activity from wherever you were standing: three taps into a shelf count, one back gesture and
* ThreadCount was gone. Here back walks the WebView's history instead — which includes the app's
* own client-side routing — and only leaves the app once there is nothing left to go back to.
*
* The callback's enabled flag is kept in step with canGoBack() rather than left permanently on,
* because Android 13+ reads that flag before the gesture starts to decide whether to animate. With
* it accurate, a back gesture at the root peels the app away to reveal the home screen (predictive
* back, switched on by android:enableOnBackInvokedCallback in the manifest); anywhere else it
* stays put and moves the app back one screen.
*/
public class MainActivity extends BridgeActivity {
private OnBackPressedCallback back;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// A device with no WebView never gets a bridge; there is nothing to navigate.
if (getBridge() == null) return;
back = new OnBackPressedCallback(false) {
@Override
public void handleOnBackPressed() {
WebView web = getBridge().getWebView();
if (web != null && web.canGoBack()) {
web.goBack();
} else {
// Nothing left in this WebView: hand the gesture back to the system.
setEnabled(false);
}
}
};
getOnBackPressedDispatcher().addCallback(this, back);
// pushState, replaceState and ordinary navigations all land here, which is what makes the
// enabled flag above trustworthy in a single-page app.
getBridge().setWebViewClient(new BridgeWebViewClient(getBridge()) {
@Override
public void doUpdateVisitedHistory(WebView view, String url, boolean isReload) {
super.doUpdateVisitedHistory(view, url, isReload);
syncBack(view);
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
syncBack(view);
}
/**
* Capacitor's own version swaps in the bundled "No connection." screen for any main
* frame response that isn't 2xx. That is the wrong diagnosis for most of them: the
* site answered, and its 404 and its branded 500 (which carries the reference someone
* reads out on the phone) are both better pages than a bundled one sending a counter
* off to check the ward's wifi over a problem that isn't the wifi. A gateway status is
* the exception — nothing is answering behind the proxy, which is what the offline
* screen actually describes.
*/
@Override
public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
int status = errorResponse != null ? errorResponse.getStatusCode() : 0;
if (status == 502 || status == 503 || status == 504) {
super.onReceivedHttpError(view, request, errorResponse);
}
}
});
syncBack(getBridge().getWebView());
giveTheSiteTheBridge();
}
private void syncBack(WebView view) {
if (back != null && view != null) back.setEnabled(view.canGoBack());
}
/** The one origin the shell hands over to, from capacitor.config.ts server.allowNavigation. */
private static final String SITE_ORIGIN = "https://threadcount.tech";
/**
* Put window.Capacitor on the live site.
*
* The shell opens on its bundled welcome at https://localhost and then hands the WebView to
* threadcount.tech. Capacitor 6 installs its JavaScript bridge with addDocumentStartJavaScript
* scoped to a single origin — the app's own, https://localhost — and, having done that, drops
* the request-proxy path that would otherwise have injected it into pages from the hosts in
* allowNavigation. So every page the counter actually uses arrived with androidBridge (the
* message channel is registered for allowNavigation hosts too) but no window.Capacitor: the
* site took itself for a browser, scanned with Chromium's BarcodeDetector instead of MLKit,
* never buzzed, could not hand a link to Chrome, and offered a print button that cannot print
* here. Found on a Pixel 8 Pro running the Play build, 2026-09-12, by evaluating
* typeof window.Capacitor on /m/login: "undefined".
*
* This registers the identical script — the same seven pieces Bridge assembles, in the same
* order — for the site's origin as well. On a WebView too old for document-start scripts
* Capacitor keeps its proxy injector, which already covers allowNavigation hosts, so nothing
* is added there.
*
* The plugin registry is the one piece Bridge keeps private; it is read reflectively, and
* proguard-rules.pro keeps com.getcapacitor.** intact so the field name survives R8. If any
* of this fails the app is exactly as it was before — signed in, working, web scanner — and
* says why in logcat rather than crashing a counter mid-shift.
*/
private void giveTheSiteTheBridge() {
Bridge bridge = getBridge();
WebView web = bridge == null ? null : bridge.getWebView();
if (web == null) return;
if (!WebViewFeature.isFeatureSupported(WebViewFeature.DOCUMENT_START_SCRIPT)) return;
try {
String script = bridgeScript(bridge);
WebViewCompat.addDocumentStartJavaScript(web, script, Collections.singleton(SITE_ORIGIN));
Log.i("ThreadCount", "Capacitor bridge registered for " + SITE_ORIGIN);
} catch (Exception e) {
Log.e("ThreadCount", "Could not register the Capacitor bridge for " + SITE_ORIGIN + "; the site will run as a browser page", e);
}
}
/** Bridge.getJSInjector(), piece for piece, using the public JSExport helpers it calls. */
private String bridgeScript(Bridge bridge) throws Exception {
String globalJS = JSExport.getGlobalJS(this, bridge.getConfig().isLoggingEnabled(), bridge.isDevMode());
String bridgeJS = JSExport.getBridgeJS(this);
String pluginJS = JSExport.getPluginJS(pluginsOf(bridge));
String cordovaJS = JSExport.getCordovaJS(this);
String cordovaPluginsJS = JSExport.getCordovaPluginJS(this);
String cordovaPluginsFileJS = JSExport.getCordovaPluginsFileJS(this);
String localUrlJS = "window.WEBVIEW_SERVER_URL = '" + bridge.getLocalUrl() + "';";
return globalJS + "\n\n" + localUrlJS + "\n\n" + bridgeJS + "\n\n" + pluginJS + "\n\n"
+ cordovaJS + "\n\n" + cordovaPluginsFileJS + "\n\n" + cordovaPluginsJS;
}
@SuppressWarnings("unchecked")
private static Collection<PluginHandle> pluginsOf(Bridge bridge) throws Exception {
Field f = Bridge.class.getDeclaredField("plugins");
f.setAccessible(true);
Map<String, PluginHandle> plugins = (Map<String, PluginHandle>) f.get(bridge);
if (plugins == null || plugins.isEmpty()) throw new IllegalStateException("Bridge has no plugins registered");
return plugins.values();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Android 12 and later ignore windowBackground for the launch screen and use the SplashScreen
API instead, which is why the app opened on a white rounded launcher icon rather than ink.
Setting the background here makes the very first frame the same ink the bundled splash uses,
and the icon is deliberately a transparent drawable: the bundled splash draws the mark itself,
one bar at a time, and showing it still first and then redrawing it reads as a stutter. -->
<resources>
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/tcInk</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>
<item name="postSplashScreenTheme">@style/AppTheme.NoActionBar</item>
<item name="android:statusBarColor">@color/tcInk</item>
<item name="android:navigationBarColor">@color/tcInk</item>
<item name="android:windowLightStatusBar">false</item>
</style>
</resources>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- The brand palette, so the shell around the WebView is never a colour ThreadCount doesn't use. -->
<resources>
<color name="colorPrimary">#201E1D</color>
<color name="colorPrimaryDark">#201E1D</color>
<color name="colorAccent">#EC3013</color>
<color name="tcInk">#201E1D</color>
<color name="tcPaper">#F3F2F2</color>
</resources>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#F3F2F2</color>
</resources>
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">ThreadCount</string>
<string name="title_activity_main">ThreadCount</string>
<string name="package_name">tech.threadcount.app</string>
<string name="custom_url_scheme">tech.threadcount.app</string>
</resources>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:background">@null</item>
</style>
<!-- The launch screen is the ink ground the bundled splash then draws the mark on, so the
hand-off from native to WebView is invisible. Light status bar content, because every
screen the app opens on is ink. -->
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
<item name="android:background">@drawable/splash</item>
<item name="android:statusBarColor">@color/tcInk</item>
<item name="android:navigationBarColor">@color/tcInk</item>
<item name="android:windowLightStatusBar">false</item>
</style>
</resources>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Nothing about a signed-in linen room belongs in a Google Drive backup or on a transferred
device: the WebView holds a live session cookie and an unfinished stocktake. A new device
signs in again, which takes ten seconds and is the honest behaviour. -->
<data-extraction-rules>
<cloud-backup>
<exclude domain="root" />
<exclude domain="database" />
<exclude domain="sharedpref" />
<exclude domain="external" />
</cloud-backup>
<device-transfer>
<exclude domain="root" />
<exclude domain="database" />
<exclude domain="sharedpref" />
<exclude domain="external" />
</device-transfer>
</data-extraction-rules>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="my_images" path="." />
<cache-path name="my_cache_images" path="." />
</paths>
@@ -0,0 +1,18 @@
package com.getcapacitor.myapp;
import static org.junit.Assert.*;
import org.junit.Test;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}