我創建了一個後臺服務,它定期打到我的服務器,但不幸的是,後臺服務在一段時間後停止。 public class LocationService extends Service{
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
//TODO do something useful
我開始與Symfony的服務工作,並因此創造了從symfony的文檔,示例服務: namespace AppBundle\Service;
use Psr\Log\LoggerInterface;
class MessageGenerator
{
private $logger;
public function __construct(LoggerInterface