Android Bluetooth connection Auto Test tool

Source: Internet
Author: User

Bluetooth connection Automatic test tool 1. Demand generation

Development does not follow demand is bullying and waste of time. The demand for this tool arises when developers are developing products that involve Bluetooth drivers and Android Bluetooth two things. However, Bluetooth is not very stable, then the work came. Developers need to develop, once again testing (with the product's Android app has been connected, product equipment restart, Android app to connect Bluetooth, and then restart the product equipment ...). Cycle the process), the process is boring and meaningless. We must be lazy as programmers. So there is the birth of this tool.

2. Function Introduction
    • 1. In addition to the first manual connection to the required device Bluetooth, the device can be automatically re-connected after restart
    • 2. After the device is connected, the command is sent automatically (this is the main test of Bluetooth connection, so the reboot command is used.) See what you enter in the input box. Note that the send is character type, to enter the command within 10S before the first connection
    • 3. automatically count connection failures (more than 5 attempts to connect failed)
    • 4. Connection failure + 1 o'clock vibration alert

GitHub address here: Https://github.com/liangjfblue/AutoTestBluetooth

These three functions liberate our hands, turn on the software settings to send the command, put on the test is OK. O (∩_∩) o haha ~

3. Development environment
    • 1.Linux + Android Studio
    • 2.Android API 26.0
    • 3. Bluetooth 2.0
    • 4. Huawei P10
4. Two-time development
    • 1.clone Down, import idea
    • 2. If you do not have Android API 26.0, download it Yourself

Version update

    • V1.1 wire break automatically re-connect. 2. Automatically send the input box command after connection. 3. Connection failure + 1 o'clock vibration alert
    • V1.2 modification requirements, reconnection has been detected for more than 2 minutes without connection on the direct Vibration alert Exit program
    • The V1.3 feature is the same as V1.1 fix a bug that re-connects multiple times to send commands. Fix the exception after reconnecting the crash issue

Android Bluetooth connection Auto Test tool

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.