I am new in android and I don't know how to do this, I want to create a background service, There is two main component in my app one is Button (Start Earning) and another is TextView (Points). I want to create service like if User Open app and Click on Start Earning Button then the the points in TextView wants to Increase Continuously For 1 Hour (100 Points In 1 Hour). then after 1 hour I want to stop that service automatically even if app is closed
Example Is In This Screenshot.
Pls Help Me I Search Every Where (Google,Stackoverflow,Github,etc.) But I Don't Get Any Answer.