How can you charge your android device while printing?

How can you charge your android device while printing? Many of my models take a long time to print and my device will run out of battery they are completed.

I tried one like it (https://www.amazon.com/gp/product/B00NSBVNCM/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1) and it didn’t work.

You either need a tablet with a separate power port, or an OTG-Y cable and a hacked kernel to allow charging and OTG at the same time. See https://plus.google.com/+MathiasDietz/posts/JKPv4bwVxPe

I found this:

and it seems to work for Nexus 6 (set switch to 3) and Nexus 7 (2013) (set switch to 3). It does not appear to work for Nexus 7 (2012).

I am using a “Dragon Touch Y88X Plus” 7 inch tablet, about $40 from Amazon. It has separate AC plug and microUSB for data, and it holds 100% charge over 24 hours running GCodePrintr

some news about charging a Nexus while printing: The nexus 7 supports wireless charging (Qi) which should work fine while printing. I don’t have a Nexus to test with, but my Galaxy S7 will charge wireless while printing (using a 9$ Qi charger)