Had same problem with Samsung tab a. When I put in the charger the battery charging screen turned up. The problem was that before the background light of the charging screen turned of, the battery was dead again. Here is how I solved it.
When the charging screen which shows a percentage shows up, press the power button short to start the device. Like this there is a black screen for a second (battery can charge a little bit).
Then when the tab is starting hold the power button together with the volume down button for about 12 seconds. The tab shuts down and you will have a black screen again for a few seconds (charging the battery without background light).
Then the tab will boot again showing the charging screen. When you get the charging screen showing the battery percentage, start the procedure again. Repeat these actions about 5 to 10 times.
After that, when you come back to the charging screen showing the battery percentage, leave it alone. Normally after 1 minute the screen will turn black, and stays black. After 5 minutes, if you press the home button the tab should show it has 1 percent battery and now it can charge normal again.