You don't need to buy expensive (and proprietary) equipment to connect your guitar to your phone. Android is Linux, and everything that works on Linux ought to (and does) work on Android too.
The simplest way to connect your guitar to your phone is to use adapters. Since the guitar jack is 1/4" TRS and the phone input is 3.5mm 4 way pin, you need two adapters:
You simply connect your guitar jack to the 1/4" TRS to 3.5mm adapter, and then this adapter to Two Way 3.5mm splitter. Connect a headphone or speakers to this splitter, and connect the splitter to the phone. Restart the app to make it route audio through the splitter automatically, or manually set it by going to Settings -> Audio Devices
You can also connect a guitar (or mic, or another instrument) to your phone using a USB Audio Interface. Because Android is essentially Linux (thankfully with all standard modules compiled in) you can use any HID Audio device with your phone. Amp Rack will automatically pick an external audio interface. You can also manually set input and output audio devices by going to *Settings -> Audio Devices**
You can connect using an Audio Interface in the following manner: