It will be safe, but how much power is drawn will depend on the phone or tablet.
Most other stuff ignores the coding and just draws as much power as they need.