Automation of processes in a mobile operating system Android opens up opportunities for users that are often inaccessible by standard means or hidden deep in the menu. One of the popular features that attracts the attention of enthusiasts and people with disabilities is the voice notification when the device starts charging. This is not just a technical toy, but a useful tool for those who often forget to connect the power or want to monitor the battery status without having to look at the screen.
The application MacroDroid, which is famous for its intuitive interface and powerful functionality, is ideal for this task. Unlike complex script solutions that require programming knowledge, it uses a system of triggers and actions that can be understood even by a beginner. However, in order for the function to work stably and not drain the phone faster than it charges it, you need to correctly configure the system parameters and access rights.
In this article we will analyze in detail the process of creating a macro that will make your smartphone “speak” when connected to the network. We will look at the nuances of speech synthesis, optimization of power consumption and solutions to typical problems that users encounter when setting up for the first time.
Installation and initial setup of MacroDroid
The first step is to download the necessary software from the official application store. Find the Google Play application MacroDroid and install it. After the first launch, you will be asked to read the terms of use and, possibly, select the level of interface complexity. For our purposes, the standard mode is suitable, which provides access to all the necessary functions without being overloaded with unnecessary options.
A critical point at this stage is to grant the application special permissions. Without them, the macro simply will not be able to track the cable connection event or play sound. The system Android by default limits the background activity of applications to save energy, so you will have to manually allow work MacroDroid in the background.
⚠️ Attention: On smartphones with MIUI, EMUI or ColorOS shells, standard power saving settings may aggressively close the application. Be sure to add MacroDroid to your battery exceptions list and allow autostart.
You will also need access to the microphone (if you plan to record your voice) and access to system settings to change the volume if required in the scenario. Usually the application itself requests these rights when you first create a macro, but it is better to check their availability in the smartphone settings in advance to avoid interruptions in work.
If you have root access, the functionality of MacroDroid is expanded many times, allowing you to execute system commands that are not available to a regular user, but this is not required for voice charging.
Creating a connection event trigger
The logic of any macro is based on the principle “If event A happens, then do action B.” In our case, event A is connecting the charger. To set this up, open the application and click on the add a new macro button, which is usually located at the bottom of the screen or in the quick access menu.
In the Triggers section (red area), click on the plus sign. You will see an extensive list of event categories. You need to select a category Power or Power. Within this category, find the “Power Connected” option. This is the very signal that starts the chain of actions.
In some versions of the application, an additional trigger configuration window may appear. There you can specify the power source, for example, distinguish between connecting to an outlet and connecting to a computer via USB. For universal talking charging, it is better to leave the default settings so that the alert will be triggered in any case. If you want the phone to speak only from a 220V network, select the appropriate option in the trigger settings.
Setting up the speech synthesis action
After the trigger is configured, we move on to the most interesting part - the action (blue zone). Click on the plus in the actions section and select a category Notifications or Notifications, and then find the item “Speech Notification” or “Text to Speech”. It is this module that converts text into a sound wave.
In the window that opens, you will be asked to enter the text that the smartphone will pronounce. You can write any phrase, for example: “Charging is connected, battery level is 50 percent.” To add dynamic data, such as the current charge percentage, use special variables. In MacroDroid, they are inserted through the “Magic Wand” button or the variable icon.
Charging has begun. Current charge level: {battery_level} percent.
Here {battery_level} is a system variable that will automatically substitute the current value when the macro is triggered. This makes the alert informative and useful. Also in the action settings you can select the voice, speech speed and pitch. The available voices depend on the speech synthesis engine installed on your device, usually Google Speech Synthesis.
⚠️ Attention: Voice notification may not work if the phone is in Do Not Disturb or Silent mode when the cable is connected. Check the exclusion settings for system sounds or macros.
Fine-tuning volume and limits
A common problem among users is that the phone “whispers” that charging is connected, and this cannot be heard in a noisy room. To avoid this, you can add a volume change action before the speech message. In the actions section, find the category Volume and select “Set media volume” or “Set notification volume.”
Set the value to 70-100% to ensure audibility. However, if you don't want your phone to scream all night, it's worth adding a time limit. MacroDroid allows you to configure the time windows during which the macro is active. For example, you can turn off voice notifications at night from 23:00 to 07:00.
To do this, when creating a macro, use the “Restrictions” function (yellow zone). Add a time of day restriction. This will prevent your household from being woken up by a loud message that you have put your phone on charge in the middle of the night. This flexibility makes automation truly convenient and not intrusive.
☑️ Check before saving
Testing and debugging the macro
After setting all the parameters, do not rush to consider the task completed. Click the save button (check mark or floppy disk) and give the macro a name, for example, “Talking Charge.” Now you need to test the system. Disconnect the power cable from the smartphone and wait a couple of seconds, then connect it again.
If everything is configured correctly, you will hear the prepared phrase. If there is no sound, check the event log inside the application MacroDroid. The macro trigger log is displayed there. If you see a record that a macro was run but there was no sound, the problem lies with the volume or speech synthesizer settings. If there is no entry about the launch, it means that the trigger did not work due to system limitations.
⚠️ Attention: Android shell interfaces (One UI, MIUI, OxygenOS) can change the location of menu items. If you do not find a parameter, use the search inside the MacroDroid application.
Advanced features and variables
For advanced users, MacroDroid offers the creation of more complex scripts. You can make the phone speak different phrases depending on the charge level. For example, when the charge is less than 20%, the phone can speak in an alarming voice: “Critical low charge,” and at 100%, in a joyful voice: “The battery is fully charged, turn me off.”
To implement this, you will need to create several macros or use a condition If/Else within one macro, if the application version supports such logic in actions. You can also use a variable {charger_type}to have the phone report the connection type: “A fast charger is connected” or “A weak computer USB port is connected.”
| Variable | Description | Usage example |
|---|---|---|
{battery_level} |
Current percentage charge | "Charge: 45%" |
{charger_type} |
Power source type | "Type: AC (Socket)" |
{time} |
Current time | "Connection time: 14:30" |
{device_name} |
Phone model name | "Samsung Galaxy S21 is ready" |
How to change your voice to a more natural one?
To do this, go to Android settings -> Accessibility -> Speech synthesis. Select Google engine and click the gear icon. There you can download higher quality voices that sound less robotic, but take up more memory space.
Frequent problems and their solutions
Despite the ease of setup, users sometimes encounter the fact that the macro stops working after a while. The most common reason is the system's aggressive energy saving policy Android. The operating system may put the application to sleep, considering it unused, which will lead to triggers being ignored.
To solve this problem, find the MacroDroid application in the list of installed apps in your phone settings. Go to the Battery or Power Saving section for that particular app and select the No Limits or Do Not Optimize mode. This will prevent the system from closing application processes in the background.
Another reason may be related to updates to the application itself or the operating system. Developers Google periodically change the API for accessing speech synthesis or power management functions. If the function stops working after updating Android, try re-creating the macro from scratch or updating the MacroDroid application itself to the latest version.
Stable operation of voice charging depends 90% on the correct power saving settings of the Android system, and not on the complexity of the macro itself.
Is it possible to use your recorded voice instead of a synthesizer?
Yes, it is possible. Instead of the Speech Synthesizer action, select the Play Sound action. You will need to record an audio file with the desired phrase in advance, save it in the phone's memory and specify the path to this file in the action settings. This will make the notification more personalized.
Why does the phone talk even when I haven't connected the charger?
This may occur due to loose contact in the USB connector, when the system registers short-term connections and disconnections (contact bounce). Try cleaning the connector from dust or adding a limitation to the macro: trigger only if the battery level increases, and not just when connected.
Does this function work when the screen is off?
Yes, MacroDroid macros work in the background and respond to system events regardless of the screen state. The main thing is that the application itself is not forcibly closed by the Android system task manager.
Does this function consume a lot of battery?
The macro itself consumes negligible resources, since it is in event standby mode. Energy consumption occurs only at the moment of activation (operation of the processor for speech synthesis and speakers), which lasts several seconds and does not affect the overall charge balance.