# 基于微信界面为模板的androidapp开发 **Repository Path**: bone-zzz/app ## Basic Information - **Project Name**: 基于微信界面为模板的androidapp开发 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-09-16 - **Last Updated**: 2026-09-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Android Multifunctional Application Based on a WeChat-Inspired Interface ## Overview This is an Android multifunctional application designed with a WeChat-inspired interface. It is developed with a combination of Kotlin and Java. The application starts with a login page and provides access to a calculator, weather queries, sensor information, and image recognition through a bottom navigation bar. ## Features - **User registration and login**: Stores local accounts with SQLite, checks username uniqueness, validates credentials, and supports remembering login information. - **Calculator**: Supports addition, subtraction, multiplication, division, decimals, percentages, clear, backspace, and equals operations. - **Weather queries**: Supports searching by city name and locating the current city. Weather details include temperature, wind, humidity, UV index, visibility, and precipitation. - **Sensor information**: Reads and displays accelerometer, gravity, and orientation sensor data. - **Image recognition**: Selects an image from the gallery, converts it to Base64, and calls a Doubao vision model API for recognition. - **Profile and logout**: Displays profile information and provides a logout action from the main menu. ## Architecture The project is located in the `MyApplication` directory: ```text MyApplication/ ├── app/ │ └── src/main/ │ ├── java/com/example/myapplication/ │ │ ├── LoginActivity.kt # Login │ │ ├── RegisterActivity.kt # Registration │ │ ├── MainActivity.kt # Main screen and navigation │ │ ├── WeatherActivity.kt # Weather screen │ │ ├── WeatherResultActivity.kt # Weather results │ │ ├── CalculatorActivity.java # Calculator │ │ └── DBHelper.java # Local database │ └── res/ # Layouts, menus, images, and themes └── gradlew / gradlew.bat # Gradle Wrapper ``` The weather module uses Retrofit and Gson to access the QWeather API. Image recognition uses OkHttp to call the Doubao vision model API. Location lookup uses Android's native `LocationManager` and `Geocoder` APIs. ## Development Environment - Android Studio - JDK 8 or later - Android SDK 33 - Gradle Wrapper - `minSdk 24`, `targetSdk 33` - Kotlin 1.8 Main dependencies include AndroidX, AppCompat, Material Components, ConstraintLayout, Retrofit 2.9.0, Gson Converter, and OkHttp 4.9.3. ## Installation and Build 1. Open the `MyApplication` directory in Android Studio. 2. Wait for Gradle synchronization and dependency downloads to finish. 3. Connect an Android device or start an emulator running API 24 or later. 4. Run the `app` module. On Windows, a debug APK can also be built from the `MyApplication` directory: ```powershell .\gradlew.bat assembleDebug ``` The generated APK is located in `app/build/outputs/apk/debug/`. ## Usage 1. On the first launch, open the registration form and create a local account. 2. Log in with the registered account. Enable Remember Password if the credentials should be filled in on the next launch. 3. Use the bottom navigation bar to switch between the calculator, weather, discovery, and image recognition features. 4. Enter a supported city name for a weather query, or grant location permission to detect the current city. 5. Grant gallery access, select an image, and press the recognition button to use image recognition. 6. Open the top-right menu to view profile information or log out. ## Permissions The application requests the following permissions as needed: - Network access for weather queries and image recognition. - Coarse and fine location for detecting the current city. - External storage read access for selecting images from the gallery. If a permission is denied, the related feature may not work, while other local features remain available. ## Notes - Weather queries and image recognition require an internet connection and available third-party services. - Weather lookup is currently limited to the cities configured in the source code. - Before production release, move the weather API key and Doubao credentials out of the source code and manage them through secure build configuration or a backend service. - User passwords are currently stored locally without encryption and should not be used this way in a production environment. - Sensor availability depends on the device hardware; some emulators may not provide complete sensor data. ## Contributing 1. Fork the repository. 2. Create a feature branch, such as `feature/weather-improvement`. 3. Submit clear and reproducible changes. 4. Open a Pull Request describing the changes and verification steps.