iPad keeps charging and uncharging

Solution 1:

iPad Air 2 and iPhone SE have different power adapter (head charger unit). iPad Air 2 needs 10W adapter, while iPhone SE needs 5W adapter.

In my experience, I can use 10W adapter for charging my iPhone 6 (which using same adapter with iPhone SE and some users said it will boost the speed). But iPad Air 2 can not be charged with 5W adapter, because it will need more power.

If you have used the correct adapter, make sure there is no problem with the USB cable and your iPad USB port. Because sometime, dust and dirt can disrupt the charging process.

Check this page to identify your adapter: https://www.apple.com/power-adapters/

Solution 2:

Based on the video, and the fact that your iPhone charges fine off of the same cable, it looks like there could be debris in the iPad's Lightning port that's preventing the cable from seating fully.

When the cable is plugged into the iPad, see if you can wiggle it slightly from left to right (and if doing so causes it to charge – or not charge – continually, instead of flipping back and forth). If the port is clear, the cable should fit snugly and not wiggle.

I've had this happen with both the Lightning port and the headphone jack on various devices. You can use something like a toothpick or a paperclip to try to clean the debris out of the port and that will probably do the trick (just be careful to not damage anything). If you don't want to try this yourself, you can also take it to the Apple Store and they'll do it for you, using (presumably) more specialized tools.