Some users on the Samsung Galaxy J3 (2017) have reported this issue.
This appears to be a device issue rather than a problem with the game. Please see this thread for more details: https://eu.community.samsung.com/t5/Smartphones-Tablets-Wearables/My-samsung-J3-2017-keeps-restarting/td-p/747061