How to determine that the service starts for the first time?
  • What is meant by the word "for the first time"? generally in the world, on a specific device, in the current session or simply it was not launched. - KoVadim
  • you can insert a counter into it) - Gorets
  • is meant by the word "for the first time" - on a specific device - script_kid

1 answer 1

The service can create a file and at startup check the existence of the file on the device. If there is no file - for the first time, if there is something not.

  • four
    I will add: look towards SharedPreferences - Barmaley
  • one
    Everything you learn - youth ... - Barmaley
  • one
    @Barmaley all were once "youth", why not ask those who have experience, and someone might find the question useful! - script_kid
  • one
    @Barmaley for SharedPreferences thanks - script_kid
  • one
    @script_kid I'm here just to help young people - Barmaley