蓝牙锁 app 安卓项目 需要把web的dist目录 复制到项目内 再打包apk
he wei
2025-03-14 8eb7f251a6394840f60fe56079097f5f5c0492b1
U 切分支前的提交
21个文件已删除
16个文件已修改
29个文件已添加
5405 ■■■■ 已修改文件
AndroidManifest.xml 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/.idea/.gitignore 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/.idea/deploymentTargetSelector.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/.idea/kotlinc.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/build.gradle 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/capacitor.build.gradle 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/release/output-metadata.json 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/AndroidManifest.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/ic_launcher-playstore.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/whyc/lock/MainActivity.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/drawable/ic_launcher_background.xml 236 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/layout/activity_main.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/layout/bridge_layout_main.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-hdpi/ic_launcher.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-hdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-mdpi/ic_launcher.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-mdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/raw/charles.cer 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/raw/fg.cer 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/raw/whyc.cer 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/values/ic_launcher_background.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/values/strings.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/res/xml/network_security_config.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/capacitor.settings.gradle 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/gradle.properties 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/my-release-key.jks 补丁 | 查看 | 原始文档 | blame | 历史
android/variables.gradle 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
capacitor.config.ts 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
copyIcon.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
magickIcon.bat 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json 4877 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
readme.md 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
resources/android/icon/mipmap-hdpi/ic_launcher.png 补丁 | 查看 | 原始文档 | blame | 历史
resources/android/icon/mipmap-mdpi/ic_launcher.png 补丁 | 查看 | 原始文档 | blame | 历史
resources/android/icon/mipmap-xhdpi/ic_launcher.png 补丁 | 查看 | 原始文档 | blame | 历史
resources/android/icon/mipmap-xxhdpi/ic_launcher.png 补丁 | 查看 | 原始文档 | blame | 历史
resources/android/icon/mipmap-xxxhdpi/ic_launcher.png 补丁 | 查看 | 原始文档 | blame | 历史
resources/icon.png 补丁 | 查看 | 原始文档 | blame | 历史
resources/out.png 补丁 | 查看 | 原始文档 | blame | 历史
AndroidManifest.xml
New 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="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:networkSecurityConfig="@xml/network_security_config"
    android:usesCleartextTraffic="true"
    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: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" />
  <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.BLUETOOTH" />
  <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
  <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
  <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.CAMERA" />
  <uses-feature android:name="android.hardware.camera" android:required="true" />
  <uses-feature android:name="android.hardware.camera.autofocus" android:required="true" />
</manifest>
android/.idea/.gitignore
File was deleted
android/.idea/deploymentTargetSelector.xml
@@ -4,10 +4,10 @@
    <selectionStates>
      <SelectionState runConfigName="app">
        <option name="selectionMode" value="DROPDOWN" />
        <DropdownSelection timestamp="2024-12-16T00:16:31.174965200Z">
        <DropdownSelection timestamp="2025-03-13T06:04:40.693860100Z">
          <Target type="DEFAULT_BOOT">
            <handle>
              <DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\Administrator\.android\avd\flutter_emulator.avd" />
              <DeviceId pluginId="PhysicalDevice" identifier="serial=OBQKWGGEY5DMQ4BM" />
            </handle>
          </Target>
        </DropdownSelection>
android/.idea/kotlinc.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="KotlinJpsPluginSettings">
    <option name="version" value="1.9.22" />
    <option name="version" value="1.9.10" />
  </component>
</project>
android/app/build.gradle
@@ -5,6 +5,7 @@
    compileSdk rootProject.ext.compileSdkVersion
    defaultConfig {
        applicationId "com.whyc.lock"
//        applicationId "com.whyc.lock.release"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
@@ -16,8 +17,19 @@
            ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
        }
    }
    signingConfigs {
        release {
            storeFile file(MYAPP_RELEASE_STORE_FILE)
            storePassword MYAPP_RELEASE_STORE_PASSWORD
            keyAlias MYAPP_RELEASE_KEY_ALIAS
            keyPassword MYAPP_RELEASE_KEY_PASSWORD
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
@@ -25,9 +37,9 @@
}
repositories {
    // flatDir{
    //     dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
    // }
    flatDir{
        dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
    }
}
dependencies {
@@ -40,9 +52,6 @@
    androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
    androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
    implementation project(':capacitor-cordova-android-plugins')
    // implementation 'com.github.outsystems:osbarcode-android:1.1.0'
    // implementation("com.github.outsystems:osbarcode-android:1.0.0@aar")
}
apply from: 'capacitor.build.gradle'
android/app/capacitor.build.gradle
@@ -9,8 +9,10 @@
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
    implementation project(':capacitor-community-bluetooth-le')
    implementation project(':capacitor-app')
    implementation project(':capacitor-camera')
    implementation project(':capacitor-geolocation')
    implementation project(':capacitor-haptics')
    implementation project(':capacitor-keyboard')
    implementation project(':capacitor-status-bar')
android/app/release/output-metadata.json
New file
@@ -0,0 +1,20 @@
{
  "version": 3,
  "artifactType": {
    "type": "APK",
    "kind": "Directory"
  },
  "applicationId": "com.whyc.lock",
  "variantName": "release",
  "elements": [
    {
      "type": "SINGLE",
      "filters": [],
      "attributes": [],
      "versionCode": 1,
      "versionName": "1.0",
      "outputFile": "app-release.apk"
    }
  ],
  "elementType": "File"
}
android/app/src/main/AndroidManifest.xml
@@ -6,10 +6,9 @@
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:networkSecurityConfig="@xml/network_security_config"
    android:usesCleartextTraffic="true"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
      android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
      android:name=".MainActivity"
@@ -39,12 +38,14 @@
  <!-- Permissions -->
  <uses-permission android:name="android.permission.INTERNET" />
  <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.BLUETOOTH" />
  <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
  <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
  <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.CAMERA" />
android/app/src/main/ic_launcher-playstore.png
android/app/src/main/java/com/whyc/lock/MainActivity.java
@@ -1,34 +1,19 @@
package com.whyc.lock;
import android.os.Build;
import android.os.Bundle;
import com.getcapacitor.BridgeActivity;
// public class MainActivity extends BridgeActivity {}
import android.os.Bundle; // 添加这个导入语句
import android.bluetooth.BluetoothAdapter;
import android.content.Intent;
import android.webkit.WebView;
public class MainActivity extends BridgeActivity {
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // 打开安卓系统蓝牙
    BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
    if (bluetoothAdapter != null && !bluetoothAdapter.isEnabled()) {
      Intent enableBluetoothIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
      startActivityForResult(enableBluetoothIntent, REQUEST_ENABLE_BT);
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // 检查 Android 版本是否为 4.4(KitKat)及以上
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            // 开启 WebView 的调试功能
            WebView.setWebContentsDebuggingEnabled(true);
        }
    }
  }
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (requestCode == REQUEST_ENABLE_BT && resultCode == RESULT_OK) {
      // 安卓系统蓝牙已打开
    } else if (requestCode == REQUEST_ENABLE_BT && resultCode == RESULT_CANCELED) {
      // 用户取消打开安卓系统蓝牙
    }
  }
  private static final int REQUEST_ENABLE_BT = 1;
}
}
android/app/src/main/res/drawable/ic_launcher_background.xml
@@ -1,170 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="108dp"
<vector
    android:height="108dp"
    android:width="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" />
    android:viewportWidth="108"
    xmlns:android="http://schemas.android.com/apk/res/android">
    <path android:fillColor="#3DDC84"
          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>
android/app/src/main/res/layout/activity_main.xml
@@ -9,8 +9,4 @@
    <WebView
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
    <!-- <WebView
      android:id="@+id/webview"
      android:layout_width="match_parent"
      android:layout_height="match_parent" /> -->
</androidx.coordinatorlayout.widget.CoordinatorLayout>
android/app/src/main/res/layout/bridge_layout_main.xml
File was deleted
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary files differ
android/app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary files differ
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Binary files differ
android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
Binary files differ
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Binary files differ
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary files differ
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary files differ
android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary files differ
android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Binary files differ
android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Binary files differ
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Binary files differ
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary files differ
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary files differ
android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary files differ
android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Binary files differ
android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
Binary files differ
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Binary files differ
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary files differ
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary files differ
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary files differ
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
Binary files differ
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
Binary files differ
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Binary files differ
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Binary files differ
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary files differ
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary files differ
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
Binary files differ
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
Binary files differ
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Binary files differ
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Binary files differ
android/app/src/main/res/raw/charles.cer
Binary files differ
android/app/src/main/res/raw/fg.cer
Binary files differ
android/app/src/main/res/raw/whyc.cer
Binary files differ
android/app/src/main/res/values/ic_launcher_background.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="ic_launcher_background">#FFFFFF</color>
    <color name="ic_launcher_background">#CCCCCC</color>
</resources>
android/app/src/main/res/values/strings.xml
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
    <string name="app_name">myapp2</string>
    <string name="title_activity_main">myapp2</string>
    <string name="app_name">lock outline</string>
    <string name="title_activity_main">lock outline</string>
    <string name="package_name">com.whyc.lock</string>
    <string name="custom_url_scheme">com.whyc.lock</string>
</resources>
android/app/src/main/res/xml/network_security_config.xml
File was deleted
android/capacitor.settings.gradle
@@ -2,12 +2,18 @@
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
include ':capacitor-community-bluetooth-le'
project(':capacitor-community-bluetooth-le').projectDir = new File('../node_modules/@capacitor-community/bluetooth-le/android')
include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
include ':capacitor-camera'
project(':capacitor-camera').projectDir = new File('../node_modules/@capacitor/camera/android')
include ':capacitor-geolocation'
project(':capacitor-geolocation').projectDir = new File('../node_modules/@capacitor/geolocation/android')
include ':capacitor-haptics'
project(':capacitor-haptics').projectDir = new File('../node_modules/@capacitor/haptics/android')
android/gradle.properties
@@ -21,5 +21,7 @@
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# 每次运行 Gradle 构建命令时,都会自动以显示所有警告的模式运行
org.gradle.warning.mode=all
MYAPP_RELEASE_STORE_FILE=my-release-key.jks
MYAPP_RELEASE_KEY_ALIAS=myappkey
MYAPP_RELEASE_STORE_PASSWORD=whyc123456
MYAPP_RELEASE_KEY_PASSWORD=whyc123456
android/my-release-key.jks
Binary files differ
android/variables.gradle
@@ -1,5 +1,5 @@
ext {
    minSdkVersion = 26
    minSdkVersion = 22
    compileSdkVersion = 34
    targetSdkVersion = 34
    androidxActivityVersion = '1.8.0'
capacitor.config.ts
@@ -2,7 +2,7 @@
const config: CapacitorConfig = {
  appId: 'com.whyc.lock',
  appName: 'myapp2',
  appName: 'Lock App',
  webDir: 'dist',
  plugins:{
    Bluetooth: {
@@ -18,6 +18,13 @@
      formats: ['qr', 'ean', 'upc', 'pdf417', 'code39', 'code128', 'aztec', 'datamatrix'],
      presentationStyle: 'fullScreen',
      preferFrontCamera: false
    },
    CapacitorAssets: {
      android: {
        icon: {
          sources: ["resources/icon.png"]
        }
      }
    }
  },
  // plugins: [
@@ -37,10 +44,10 @@
  },
  android: {
    buildOptions: {
      keystorePath: '../myapp2.keystore',
      keystorePassword: '123456',
      keystoreAlias: 'myapp2',
      keystoreAliasPassword: '123456'
      // keystorePath: '../myapp2.keystore',
      // keystorePassword: '123456',
      // keystoreAlias: 'myapp2',
      // keystoreAliasPassword: '123456'
    },
  }
};
copyIcon.js
New file
@@ -0,0 +1,26 @@
const fs = require('fs');
const path = require('path');
const sourceDir = path.join(__dirname, 'resources', 'android', 'icon');
const targetDir = path.join(__dirname, 'android', 'app', 'src', 'main', 'res');
// 定义不同分辨率的目录和对应的尺寸
const densities = [
    { dir: 'mipmap-mdpi', size: '128x128' },
    { dir: 'mipmap-hdpi', size: '192x192' },
    { dir: 'mipmap-xhdpi', size: '256x256' },
    { dir: 'mipmap-xxhdpi', size: '384x384' },
    { dir: 'mipmap-xxxhdpi', size: '512x512' }
];
densities.forEach(({ dir, size }) => {
    const sourceFile = path.join(sourceDir, dir, 'ic_launcher.png');
    const targetFile = path.join(targetDir, dir, 'ic_launcher.png');
    if (fs.existsSync(sourceFile)) {
        fs.copyFileSync(sourceFile, targetFile);
        console.log(`Copied ${sourceFile} to ${targetFile}`);
    } else {
        console.log(`Source file ${sourceFile} not found.`);
    }
});
magickIcon.bat
New file
@@ -0,0 +1,12 @@
md resources\android\icon\mipmap-xxxhdpi
md resources\android\icon\mipmap-xxhdpi
md resources\android\icon\mipmap-xhdpi
md resources\android\icon\mipmap-hdpi
md resources\android\icon\mipmap-mdpi
magick resources/icon.png -resize 512x512 resources/android/icon/mipmap-xxxhdpi/ic_launcher.png
magick resources/icon.png -resize 384x384 resources/android/icon/mipmap-xxhdpi/ic_launcher.png
magick resources/icon.png -resize 256x256 resources/android/icon/mipmap-xhdpi/ic_launcher.png
magick resources/icon.png -resize 192x192 resources/android/icon/mipmap-hdpi/ic_launcher.png
magick resources/icon.png -resize 128x128 resources/android/icon/mipmap-mdpi/ic_launcher.png
package-lock.json
Diff too large
package.json
@@ -1,5 +1,6 @@
{
  "name": "myapp2",
  "displayName": "Lock App",
  "version": "0.0.1",
  "private": true,
  "scripts": {
@@ -8,29 +9,33 @@
    "build": "echo hhh",
    "test:unit": "vue-cli-service test:unit",
    "test:e2e": "vue-cli-service test:e2e",
    "copyicons": "node copyIcon.js",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "@capacitor-community/bluetooth-le": "^6.1.0",
    "@capacitor/android": "6.2.0",
    "@capacitor/app": "6.0.2",
    "@capacitor/camera": "^6.1.2",
    "@capacitor/core": "6.2.0",
    "@capacitor/geolocation": "^6.1.0",
    "@capacitor/haptics": "6.0.2",
    "@capacitor/keyboard": "6.0.3",
    "@capacitor/status-bar": "6.0.2",
    "@ionic-native/bluetooth-le": "^5.36.0",
    "@ionic/vue": "^7.0.0",
    "@ionic/vue-router": "^7.0.0",
    "cordova-plugin-bluetooth-serial": "^0.4.7",
    "cordova-plugin-bluetoothle": "^6.7.4",
    "vue-qrcode-reader": "^5.6.0",
    "core-js": "^3.6.5",
    "ionicons": "^7.0.0",
    "vue": "^3.2.47",
    "vue-qrcode-reader": "^5.6.0",
    "vue-router": "^4.1.6"
  },
  "devDependencies": {
    "@capacitor/cli": "6.2.0",
    "@types/jest": "^27.0.2",
    "@capacitor/assets": "3.0.5",
    "@typescript-eslint/eslint-plugin": "^5.6.0",
    "@typescript-eslint/parser": "^5.6.0",
    "@vue/cli-plugin-babel": "~5.0.0-rc.1",
readme.md
New file
@@ -0,0 +1,17 @@
#### out line
  # 分支  outline
  ### ico color
``` #cccccc
```
  # appid  com.whyc.lock
  # appname lock outline
#### release
  # 主分支 master
```#00c4fd
```
  # appid com.whyc.lock2
  # appname lock app
resources/android/icon/mipmap-hdpi/ic_launcher.png
resources/android/icon/mipmap-mdpi/ic_launcher.png
resources/android/icon/mipmap-xhdpi/ic_launcher.png
resources/android/icon/mipmap-xxhdpi/ic_launcher.png
resources/android/icon/mipmap-xxxhdpi/ic_launcher.png
resources/icon.png
resources/out.png