Use any hex editor apps that are available for android and change the value of HEX Dword to any amount you want.
Coins HEX 23 f2 ff 14 Dword
Rubies HEX 65 c3 cc 33 Dword
Hearts HEX 42 a4 bb 65 Dword
If the codes doesn't work, it is possible that your android version is not compatible with the code so look for Coins, Rubies and Hearts via editor and play with values.