Have you ever been involved in a software piracy trial or read up on one?
If an application is under dispute it needs to be proved it is/is not pirated. Which code must be reviewed (usually by some legal third party).
You can get caught, the question is would anyone pursue it. Big companies like EA would sue, but for a small app on the market? Only (mostly) if you make a butt ton of money.
Picture this, you make an amazing app. You pirated the software of course, no worries. You have 10,000 downloads and you are not worried. A year later your app has 10,000,000 downloads and you generated over a million of dollars. You might get a little more worried people try to target you for pirating.