When I put my Android device to charge, the lock screen says "Charging slowly":
Is it a particular software setting that tells Android to charge slowly?
How to make Android charge fast?
This is not a software setting: Android is just telling you that the power source you connected the device to is not giving enough electrical power to charge as fast as it could.
It seems that:
The solution is to make more electrical power come to your device:
Edit: Please see @beeshyams' answer explaining why charging slowly is actually a good thing when your battery is already quite full.
Other answers have explained about how to make it charging faster, this answer tries to explain more about the threshold that the Android uses.
The charging speed is not configurable; it's just a status that Android shows to let the user knows about it.
When it was first implemented, it's based on the how much current (in milliAmpere) it receives. As shown on the commit log, "Show charging speed on Keyguard", specifically, the config.xml file, the default values were,
<!-- Threshold in micro amperes below which a charger is rated as "slow" -->
<!-- Threshold in micro amperes above which a charger is rated as "fast" -->
5 months later, the implementation was changed to be based on power (in microWatts) it receives. As shown on the commit log, "Charging speed based on voltage", from the same config.xml file, the default values were,
<!-- Threshold in micro watts below which a charger is rated as "slow"; 1A @ 5V -->
<!-- Threshold in micro watts above which a charger is rated as "fast"; 1.5A @ 5V -->
Now, the default values and current behavior (using microWatts instead of Amperes) might be problematic on some devices (e.g. Nexus 5). However, those values are also adjustable by vendor/OS maker, as seen in LineageOS' case.
The default slow charge threshold in the framework is set to 5000000 microwatts. This assumes the devices OEM wall charger output is 1A @ 5V.
The OEM LG Nexus 5 wall charger can only output 1.1A @ 4.8V at its max. Then that is further reduced to around 1A @ 4.3V by the charging driver in the kernel. This results in the lock screen incorrectly displaying "Charging slowly" all the time.
Prior to Nougat, the threshold was based on microAmperes and was set to 1000000, which the charger/device could easily do, resulting in the lock screen displaying "Charging".
This change lowers the threshold from 5000000 to 4200000 microwatts so that wall chargers show "Charging" on the lock screen, returning it to stock Marshmallow behavior.
Note: This threshold only affects what is displayed on the lock screen. It does not affect actual charging current.
This is by way of supplementing OP's research with additional relevant inputs
Current drawn for charging is not uniform. It varies depending on the stage of charging as can be seen from Figure 1 here
This is reiterated by OEM-see footnote 1
Battery must be substantially depleted; charging rate slows as charging progresses
Andrew's answer explains the associated current and power limits depending on which the mode changes and is android feature. Aside, Samsung has come up with user configurable options to enable/disable fast charging
Options suggested by OP are all valid with a caveat- While mixing and matching cables to maximize current as quoted by you (example for 6P/ 5X from my earlier answer) is a good idea, you need to bear in mind the following
I've found another potential cause for
Charging slowly which I didn't see in any previous answers.
My phone (Moto G7, USB-C charger) had debris in the charging port which made it difficult to charge. The connection was loose, and when it charged at all, it would often indicate that it was
In my case cleaning it, then cleaning it some more, then giving up because I thought it was a lost cause, then cleaning it again. It was hard to believe how many small clumps of dust came out.
Sites such as this one suggest compressed air and a toothpick. I've also heard a number of other suggestions, listed below. I tried a plastic dental pick and it removed some dust, but bent and eventually broke when attempting to scrape compacted debris from the deepest part of the port.
Take the following suggestion at your own risk because it may scratch or short your charging port, but for me scraping the deepest part of the port with a straightened staple was what finally solved the problem. Again: please attempt softer, non-conductive methods first.
Once I did this, my charger firmly connected and started Turbo Charging immediately.
Based on suggestions found in various Google Searches, forum posts, and what I had on hand in my office. From lowest- to highest-risk, by my own estimation. I hope such a ranking is ok and not too opinion-based or off-topic. I wanted to provide a useful reference to hopefully help someone avoid the frustration of finicky charging.