写了一个类继承Service,在service里面写了定位监听。然后new方法创建类对象,成功实现了定位;但是在onStartCommand()方法里面的代码,并没有执行; 通过Intent localIntent = new Intent(this, MyLocationService.class); startService(localIntent);onStartCommand()里面的方法才被执行,这是为什么呢?
收起
当前问题酬金
¥ 0 (可追加 ¥500)
支付方式
扫码支付
支付金额 15 元
提供问题酬金的用户不参与问题酬金结算和分配
支付即为同意 《付费问题酬金结算规则》
报告相同问题?