stopSelf() vs stopSelf(int) vs stopService(Intent)

后端 未结 7 1277
鱼传尺愫
鱼传尺愫 2020-12-29 00:56

What\'s the difference in calling
stopSelf() , stopSelf(int) or stopService(new Intent(this,MyServiceClass.class))
inside

7条回答
  •  轮回少年
    2020-12-29 01:42

    stopService() is called from the class from where the Service is started. stopSelf() is called within the running service class to stop the Service

提交回复
热议问题