Android:
public class LocationService extends Service {
@Override
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
startActivity(new Intent(this, activity.class));
}
}
Tôi đã ra mắt dịch vụ này từ Activity
Trong trường Activityhợp điều kiện thỏa mãn bắt đầu
startService(new Intent(WozzonActivity.this, LocationService.class));
từ LocationServiceđề cập ở trên của tôi không thể khởi chạy Activity, làm thế nào tôi có thể có được bối cảnh chạy hiện tại Activitytrong lớp dịch vụ?