MCPcopy Index your code
hub / github.com/Skythinker616/gpt-assistant-android

github.com/Skythinker616/gpt-assistant-android @v3.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.0.0 ↗ · + Follow
975 symbols 2,663 edges 71 files 83 documented · 9%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<b>English | <a href="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/README.md">简体中文</a></b>







<img src="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/readme_img/icon.jpg" height="100px"/>
<h1>GPT Assistant</h1>







<font size=3>
    <b>Full-featured GPT Assistant for Android</b>


    <b>Quick Launch · Voice Interaction · Web Access · File Upload · Agent</b>
</font>














    <a href="https://gitee.com/skythinker/gpt-assistant-android">
        <img src="https://gitee.com/skythinker/gpt-assistant-android/badge/star.svg"/>
        <img src="https://gitee.com/skythinker/gpt-assistant-android/badge/fork.svg"/>
    </a>
    <a href="https://github.com/Skythinker616/gpt-assistant-android">
        <img src="https://img.shields.io/github/stars/skythinker616/gpt-assistant-android?logo=github&style=flat"/>
        <img src="https://img.shields.io/github/forks/skythinker616/gpt-assistant-android?logo=github&style=flat"/>
    </a>
    <img src="https://img.shields.io/badge/License-GPL3.0-red"/>

Introduction

Key Features

  • Multi-scenario file processing:

    • Upload via camera / gallery / share / open / drag & drop
    • Support for images / TXT / PDF / DOCX / PPTX / XLSX files
  • Web browsing capability: Fetch web content as needed for GPT

  • Global quick access: Volume key activation / status bar shortcut / cross-app text selection

  • Smart templates: Easily customize interface for each template (custom dropdowns and input fields)

  • Multiple voice input/output interfaces: Huawei / Baidu / Whisper / Google / System TTS

  • Agent Mode (Experimental): Let AI control your phone autonomously (no image recognition needed, supports any model)

  • Fully open source: Powered by OpenAI API (or compatible interfaces), completely free to use


Feature Showcase

1. Basic Usage: Control with just volume keys

  1. Long press the volume down key to bring up the interface
  2. Hold the volume key to start voice input
  3. Release and press again to send your question
  4. Receive reply with automatic voice narration

2. Status Bar Quick Access

Pull down the status bar, tap the "GPT" button to bring up the interface. The keyboard will automatically appear for manual input.

<img src="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/readme_img/tile_btn.gif" height="400px">

3. Continuous Conversation Support

Activate the conversation icon at the top of the interface to enable continuous dialogue. Click the avatar icon on the left to delete, retry, or perform other operations on individual messages.

<img src="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/readme_img/multi_chat.gif" height="400px">

4. Upload Text/Images/Documents

  • In-app upload: Click the attachment button in the bottom left to upload documents via camera, gallery, or file selection
  • Share upload: Select text or images in other apps (like Gallery), click share, and choose this app
  • Open with: In other apps (like WeChat/QQ), select "Open with" and choose this app
  • Drag & drop upload: In apps that support dragging (WeChat, QQ, Super Transfer Station, PC multi-screen collaboration), drag files to this app's interface
  • Text selection: Select text in other apps and choose this app to process it

5. Smart Templates

Through advanced template syntax, you can add dropdown menus and other elements to the interface. For detailed instructions, see Template Writing Guide.

<img src="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/readme_img/template_code.png" height="140px">
<img src="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/readme_img/template_ui.png" height="140px">

Click the button in the top right corner of the template editing page to load the online template list. You can find more templates or share your own in the Discussion Community. Shared templates may be dynamically updated to the online template list!

6. Web Browsing Support

The Function interface allows GPT to initiate web requests. The app automatically returns the required web data to GPT, giving it internet capability (must be enabled in settings first).

<img src="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/readme_img/web_time.png" height="120px">
<img src="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/readme_img/web_weather.png" height="120px">







<img src="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/readme_img/web_jd.png" height="180px">
<img src="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/readme_img/web_zhihu.png" height="180px">

Note 1: The images above show test results using the gpt-3.5-turbo model. For better web browsing results, include phrases like "Baidu search", "Bing search", "get online", or "retrieve from xxx" in your queries.

Note 2: If you use the same queries as shown but don't get correct answers, it might be due to GPT's randomness accessing incorrect URLs or website content changes. Try modifying your query.

Note 3: Since web content must be sent to GPT, web browsing consumes a large number of tokens. Use the gpt-4 model cautiously.

Note 4: Models that don't support Functions (like gpt-4-vision-preview) cannot use the web browsing feature.

7. Agent Mode (Experimental)

After turning on "Agent Mode" from the main screen, AI can read the accessible control tree of the current screen and try actions such as tap, long press, scroll, and text input. It is suitable for simple cross-app navigation and form-filling tasks.

<img src="https://github.com/Skythinker616/gpt-assistant-android/raw/v3.0.0/readme_img/agent.gif" height="400px">

Note 1: This feature is still experimental, so recognition and operation may not work reliably in every app or on every control.

Note 2: Although the app will not keep your personal information, it is recommended to avoid using Agent Mode on pages with sensitive information such as payments, verification codes, and passwords.


Installation & Configuration

1. Download and Install

Simply download the APK file from the latest release and install it.

2. Configure OpenAI

The program uses the OpenAI API, requiring users to enter their own API_KEY in settings. You can choose to use the official service or a third-party forwarding service.

  • Using the official service

    Register an account on the OpenAI website and get an API_KEY. Enter the URL https://api.openai.com/ and your API_KEY in the app settings.

  • Using third-party forwarding services (for users in China)

    The official service is not directly accessible in China. Users can choose third-party forwarding services. We recommend GPT_API_free, which provides free access to models like gpt-3.5-turbo and gpt-4o-mini, with a limit of 200 requests/day/IP&Key, accessible within China.

3. Configure Voice Recognition (Optional)

Note: The app uses Huawei voice recognition by default. This step is usually not necessary.

Baidu Voice Recognition Interface

Users can refer to the Baidu Voice Recognition Official Documentation to register and create an application, then obtain the AppID, API Key, and Secret Key to fill in the settings.

If the "Enable Long Voice" option in settings is turned off, the Baidu short voice recognition interface is used. If enabled, the real-time voice recognition interface is used. Users need to select the corresponding service when creating their application.

Additionally, when creating the application, set the "Voice Package Name" to "Android" and enter the app package name com.skythinker.gptassistant.

Google Voice Recognition Interface

Users need to ensure that Google is installed on their system, then follow the app's guidance to set Google as the system voice recognition engine and allow it to use microphone permissions. Then select the Google voice recognition interface in the app settings.

Whisper Voice Recognition Interface

If the OpenAI interface used supports the Whisper model, simply select the Whisper voice recognition interface in the app settings.

4. Start Using

  • If you want to use volume key activation, you need to:

    1. Enable the accessibility service as prompted by the app, and allow the app to run in the background
    2. Check if there is a "Background Pop-up Interface" permission in system settings. Allow it if available, ignore if not.

      If you find that the phone vibrates after long-pressing the volume down key but no interface appears, it's likely due to missing this permission.

  • If you want to use Agent Mode, you need to:

    1. Enable this app's "Agent Mode" accessibility service in system settings
    2. Choose a model that supports Functions / tool calling
    3. Avoid using this feature on sensitive pages such as payments, verification codes, or passwords
  • Please refer to the operations in Feature Showcase to use the software.


Q&A

App Activation

Q: Long-pressing the volume down key only adjusts the volume, with no other effect?

A: Please enable the accessibility service for this app in system settings (may need to be re-enabled after restarting the phone).

Q: After long-pressing the volume down key, the phone vibrates but no interface appears?

A: Please allow the "Background Pop-up Interface" permission for the app in system settings.

Q: Volume key activation stops working after a period of inactivity?

A: Please allow the app to run in the background in system settings.

Voice Interaction

Q: No sound from voice narration / poor quality?

A: The app uses the system's built-in TTS (Text To Speech) service. You can access system voice settings through the app settings to select an appropriate voice engine. If you're not satisfied with the built-in engines, you can install third-party TTS engines like iFlytek or TTS Server.

Q: What are the differences in performance between voice recognition interfaces?

A: Testing with Chinese and mixed Chinese-English scenarios: - Huawei interface (real-time voice recognition) has high accuracy and performs best for single sentences - Baidu performs well for long sentences with reasonable segmentation but struggles with mixed Chinese-English recognition (uses standard Mandarin model) - Google supports many languages, has average Chinese recognition, and doesn't add punctuation - Whisper supports many languages with decent Chinese recognition but sometimes has uncontrollable simplified/traditional character issues and doesn't support real-time output

For English-only scenarios, Huawei, Google, and Whisper all perform well.

Q: What about voice recognition interface costs?

The app currently supports four voice recognition interfaces, with Huawei (the default) being free: - Huawei HMS (default interface) provides free voice recognition, so the author's API Key is built-in for direct use. This interface will remain available as long as Huawei's free period continues. - Google is also free but may be inaccessible in China, recommended only for overseas users - Baidu short voice recognition offers new users 150,000 calls & 180 days free quota, beyond which it costs ¥0.0034 per call - Whisper interface is provided by OpenAI, using the same interface parameters as GPT chat. For costs, refer to the official documentation

Web Browsing Related

Q: What websites can GPT access when browsing?

A: The program uses Android WebView to load web pages. Any site that can be opened with your device's browser can be accessed.

Q: What content can GPT retrieve from websites?

A: For general websites, GPT can only retrieve plain text content. For specially adapted sites like Baidu, Bing, Google, Google Scholar, Zhihu, Weibo, JD, GitHub, Bilibili, and CNKI, GPT can also access search result links.

If you think other websites need adaptation, please submit an Issue.

Q: Why does GPT say it can't retrieve content from some websites?

A: Page loading timeout (15s), login requirements, verification requirements, etc. can all cause this issue. You can try asking again or ask GPT to try a different website.

Agent Mode

Q: Why does the app ask me to enable accessibility after I tap Agent Mode?

A: Agent Mode depends on a separate accessibility service. You need to enable this app's "Agent Mode" entry in system settings. It is different from the "Volume Key Wake" accessibility entry.

Q: Why can AI still not operate some pages after I enable it?

A: Some apps do not expose complete control information to accessibility services, or the current model may not support Functions / tool calling. Sensitive pages such as payments, verification codes, and passwords are also not recommended for AI operation.

Other Usage Questions

Q: Why isn't the model I need in the list?

A: The app only includes a few common models by default. You can add custom models in settings (separated by English semicolons), which will then appear in the list.

Q: It shows "Request failed", "Request timeout", or error codes 502/503?

A: Excluding network factors, this error is generally produced by the OpenAI interface, possibly due to high server load. Please retry or wait for a while before trying again. Check OpenAI real-time status

Q: How to use non-OpenAI format model interfaces?

A: There are many LLM interfaces (like Claude, Gemini, Ollama, etc.), and this project does not plan to adapt to each one individually. Users can consider deploying systems like OneAPI or [NewAPI](https://g

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 850
Class 110
Interface 12
Enum 3

Languages

Java100%

Modules by API surface

app/src/main/java/com/skythinker/gptassistant/ui/MainActivity.java83 symbols
app/src/main/java/com/skythinker/gptassistant/data/GlobalDataHolder.java77 symbols
app/src/main/java/com/skythinker/gptassistant/data/ChatManager.java56 symbols
app/src/main/java/com/skythinker/gptassistant/data/DataTransferManager.java42 symbols
asr_core/src/main/java/com/baidu/aip/asrwakeup3/core/mini/AutoCheck.java40 symbols
app/src/main/java/com/skythinker/gptassistant/tool/WebScraper.java31 symbols
app/src/main/java/com/skythinker/gptassistant/ui/TabConfActivity.java24 symbols
app/src/main/java/com/skythinker/gptassistant/api/ChatApiClient.java24 symbols
app/src/main/java/com/skythinker/gptassistant/tool/DetailsTagHandler.java23 symbols
asr_core/src/main/java/com/baidu/aip/asrwakeup3/core/recog/RecogResult.java22 symbols
asr_core/src/main/java/com/baidu/aip/asrwakeup3/core/util/bluetooth/AndroidAudioManager.java21 symbols
app/src/main/java/com/skythinker/gptassistant/data/ModelCatalog.java21 symbols

For agents

$ claude mcp add gpt-assistant-android \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page