You need to use a cookie. By default, Android phones will accept browser cookies from web sites (although the user may of course choose to disable this). Cookies have been covered very many times in this forum - try using the search feature.
All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.