mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-04 10:09:42 +00:00
Moved marker service start up to oncreate method
This commit is contained in:
1 parent
749953ee23
commit
91cf5d7c73
1 file changed
+8
-3
+8
-3
@@ -75,6 +75,8 @@ public class RegattaActivity extends AbstractRegattaActivity {
|
|||||||
}
|
}
|
||||||
RegattaFragment regattaFragment = new RegattaFragment();
|
RegattaFragment regattaFragment = new RegattaFragment();
|
||||||
replaceFragment(R.id.content_frame, regattaFragment);
|
replaceFragment(R.id.content_frame, regattaFragment);
|
||||||
|
|
||||||
|
startMarkerService();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -87,9 +89,6 @@ public class RegattaActivity extends AbstractRegattaActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onStart() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
Intent intent = new Intent(this, MarkerService.class);
|
|
||||||
intent.putExtra(getString(R.string.check_in_url_key), checkinUrl);
|
|
||||||
startService(intent);
|
|
||||||
Intent messageSendingServiceIntent = new Intent(this, MessageSendingService.class);
|
Intent messageSendingServiceIntent = new Intent(this, MessageSendingService.class);
|
||||||
bindService(messageSendingServiceIntent, messageSendingServiceConnection, Context.BIND_AUTO_CREATE);
|
bindService(messageSendingServiceIntent, messageSendingServiceConnection, Context.BIND_AUTO_CREATE);
|
||||||
}
|
}
|
||||||
@@ -172,6 +171,12 @@ public class RegattaActivity extends AbstractRegattaActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void startMarkerService() {
|
||||||
|
Intent intent = new Intent(this, MarkerService.class);
|
||||||
|
intent.putExtra(getString(R.string.check_in_url_key), checkinUrl);
|
||||||
|
startService(intent);
|
||||||
|
}
|
||||||
|
|
||||||
private void checkOut(){
|
private void checkOut(){
|
||||||
DatabaseHelper.getInstance().deleteRegattaFromDatabase(this, checkinDigest);
|
DatabaseHelper.getInstance().deleteRegattaFromDatabase(this, checkinDigest);
|
||||||
finish();
|
finish();
|
||||||
|
|||||||
Reference in new issue
Block a user