Internal resitance of a battery and SOC related?
The best way, by far, to measure state of charge is to do coulomb counting. With this method you add a small series resistor on either the positive or negative side of your battery and integrate the voltage drop over this resistor. This will give you the integral of the current through the batteries, i.e. the charge that has gone in and/or out of the battery. As the amount of charge that a cell will hold will only deteriorate very slowly for every discharge cycle, this will give you a very accurate measure of the state of charge. Of course you will need to re-calibrate the range every 10 or so charge cycles to account for capacity loss.

Coulomb counting is not particularly hard or expensive to implement: a low-value sense resistor, current shunt amplifier (e.g. INA21x) and an integrating opamp circuit + an interrupt on your microcontroller that periodically reads the charge value and resets the integrator.

An easier but much less accurate way to gauge capacity is to track the discharge voltage curve of the battery. A full battery has a higher voltage than an empty one. The problem with this method is that when the battery is loaded down, the internal resistance will cause the voltage to decrease and the battery to appear 'emptier' than it really is. Conversely, during charging the battery constantly seems 'fuller' than it really is. Lastly, batteries have a fairly stable voltage over a large charge range. For instance, a lithium ion cell usually goes from 20 to 80% capacity in the range of just 0.4V - less for some chemistries. That means you need to do a lot of voltage conversions and average them to have reasonable SoC resolution. 

Measuring internal resistance is not a great way to try and infer SoC. Internal resistance is much stronger correlated with the age and wear of a battery than with the state of charge. It does vary with state of charge though, and as with the voltage method: if you can somehow calibrate this very often, it can give meaningful though coarse results.