Constant or variable current when using a solar charger?
As long as it can keep Vin at 4.35V or more, the CN3038 will adjust the charging current to what the source can deliver, as described on page 7 of the data sheet.
So, you can set the charging current to the maximum your solar panel can deliver (about 30mA) or more, and the CN3038 will do the rest.
If I understand the datasheet correctly, setting the charging current to, say, 500mA will also work; the CN3038 will reduce the charging current to what the solar panel can deliver at about 4.4V, so there is no real reason to make the charging current variable yourself.
The CC phase of charging will not actually show a constant current when a solar panel is connected as a power source; it will be more like &quot;use all available current (up to a maximum) without trying to make the current constant, until Vmax has been reached&quot;.
Note that if you do set the charging current to a high value, and you exchange your solar panel for a more powerful one, you would have to check if the set charging current isn't too high for the battery used.