If your all-in-one printer has the Wi-Fi Direct feature, which supports peer-to-peer connections, you can connect directly to another device wirelessly. 

If your printer does not support Wi-Fi Direct, you cannot connect directly to another device wirelessly.

See the Extended User Guide for your printer to determine if it supports a Wi-Fi Direct connection.