如何在此方法上集成排球?我是Android的新手,很难过,这是服务类的一部分,我想插入一个齐射来激活它,并单击一下按钮。请帮助我
public void requestLocationUpdates() {
Common.setRequestingLocationUpdates(this, true);
startService(new Intent(getApplicationContext(), BackgroundService.class));
if (mLocation != null)
insertdata();
try {
fusedLocationProviderClient.requestLocationUpdates(locationRequest, locationCallback ,Looper.myLooper());
}catch (SecurityException ex)
{
Log.e("Err1", "Lost location permission.Could not request it "+ex);
}
}