Let's say I have an app called "Shake It" which allows users to sign up and compete against each other on "who can shake their phone the hardest". So a user would take their phone and shake it really hard, and the sensors in the phone detect how hard they shook and determine a winner based on the results of the 2 users.
Now lets say a user can wager a certain amount of credits when they compete against each other. These credits can be gained from doing stuff inside the app (lets say they get 50 credits for sharing on Facebook) OR they can purchase x amount of credits for $1.99.
These credits would never be redeemable in real life money/goods/services, they could only be used to do stuff inside the app. Would I have any legality issues with this type of game? Could this be considered gambling even though nothing can ever be redeemed for tangible items?
In my opinion it is not gambling. By definition the gambler has some expectation of winning their wager back plus some winnings even if it is a very remote chance. In your game the loss is 100% and there is no expectation to receive their money back they used to purchase a credit (except through refund, but with that they will not receive "winnings"). What you've described is more of a bonus system many games do this already check out the big guys like hay day and clash of clans.
They are purchasing entertainment and not a chance to win money.
Ask a local lawyer, the laws about what is gambeling - and more importantly - what is allowed and what/how it's regulated is very diffrent in diffrent countries (and probably also between states in the US).
In general you're fine as long as the user can't cash out their virtual goods. Look at all the slots games all over the app stores and facebook these days. Same concept.
Disclaimer: of course you should check with a lawyer anyway.