mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-21 05:05:31 +00:00
First draft of Positioning Acitivity
This commit is contained in:
@@ -25,6 +25,10 @@ android {
|
||||
storePassword 'stg_debug'
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
|
||||
@@ -42,4 +42,6 @@
|
||||
<string name="please_wait">Please wait</string>
|
||||
<string name="error_invalid_qr_code">Invalid QR-Code</string>
|
||||
<string name="checkin_digest" translatable="false">CheckinDigest</string>
|
||||
<string name="leaderboard_name" translatable="false">leaderboard_name</string>
|
||||
<string name="mark_id" translatable="false">mark_id</string>
|
||||
</resources>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
|
||||
@@ -5,6 +5,5 @@
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/com.sap.sailing.android.shared"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
||||
|
||||
@@ -58,6 +58,27 @@
|
||||
android:scheme="http" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.RegattaActity"
|
||||
android:screenOrientation="unspecified">
|
||||
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.PositioningActivity"
|
||||
android:screenOrientation="unspecified">
|
||||
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name="com.sap.sailing.android.shared.services.sending.MessageSendingService"
|
||||
android:exported="false" >
|
||||
<intent-filter>
|
||||
<action android:name="com.sap.sailing.android.tracking.app.action.sendSavedIntents" />
|
||||
<action android:name="com.sap.sailing.android.tracking.app.action.sendMessage" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<provider
|
||||
android:name="com.sap.sailing.android.buoy.positioning.app.provider.AnalyticsProvider"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,108 @@
|
||||
apply plugin: "com.android.application"
|
||||
|
||||
def packageName = "com.sap.sailing.android.buoy.positioning.app"
|
||||
def verCode = 1
|
||||
|
||||
android {
|
||||
buildToolsVersion "22.0.0"
|
||||
compileSdkVersion 22
|
||||
|
||||
defaultConfig {
|
||||
applicationId packageName
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 22
|
||||
versionCode verCode
|
||||
versionName "$verCode - Altitude"
|
||||
useJack false // not working on Windows yet
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile "AndroidManifest.xml"
|
||||
java.srcDirs = ["src"]
|
||||
res.srcDirs = ["res"]
|
||||
assets.srcDirs = ["assets"]
|
||||
}
|
||||
|
||||
androidTest {
|
||||
java.srcDirs = ["tests/src"]
|
||||
res.srcDirs = ["tests/res"]
|
||||
assets.srcDirs = ["tests/assets"]
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
stg_debug {
|
||||
keyAlias "stg_debug"
|
||||
keyPassword "stg_debug"
|
||||
storeFile file("../android-keystore/STG-debug.jks")
|
||||
storePassword "stg_debug"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
versionNameSuffix ".debug"
|
||||
signingConfig signingConfigs.stg_debug
|
||||
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-project.txt", "../proguard-mobile.txt"
|
||||
}
|
||||
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-project.txt", "../proguard-mobile.txt"
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude "LICENSE.txt"
|
||||
exclude "META-INF/maven/com.googlecode.json-simple/json-simple/pom.properties"
|
||||
exclude "META-INF/maven/com.googlecode.json-simple/json-simple/pom.xml"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "net.hockeyapp.android:HockeySDK:3.5.0"
|
||||
|
||||
/* support libraries */
|
||||
compile "com.android.support:appcompat-v7:22.0.0"
|
||||
|
||||
/* Google Play Services */
|
||||
compile "com.google.android.gms:play-services-location:6.5.87"
|
||||
|
||||
/* local dependencies */
|
||||
compile project(":mobile:com.sap.sailing.android.shared")
|
||||
|
||||
/* all local jar-libs */
|
||||
// compile fileTree(dir: "libs", include: ["*.jar"])
|
||||
}
|
||||
|
||||
// Custom tasks
|
||||
|
||||
/**
|
||||
* Deletes apk and version from www apps directory
|
||||
*/
|
||||
clean.doLast {
|
||||
ant.delete() {
|
||||
fileset(dir: file("../../java/com.sap.sailing.www/apps"), includes: "$packageName*")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies apk into www apps directory and create version file
|
||||
*/
|
||||
build.doLast {
|
||||
// Copy APK file
|
||||
copy {
|
||||
from ("build/outputs/apk") {
|
||||
include "**/*debug.apk"
|
||||
}
|
||||
into "../../java/com.sap.sailing.www/apps"
|
||||
rename { String fileName -> fileName.replace("-debug", "") }
|
||||
}
|
||||
|
||||
// Create version file
|
||||
def versionFile = file("../../java/com.sap.sailing.www/apps/$packageName." + "version")
|
||||
versionFile.text = "$packageName" + ".apk=$verCode"
|
||||
}
|
||||
@@ -11,6 +11,6 @@
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=Google Inc.:Google APIs:22
|
||||
android.library.reference.1=../com.sap.sailing.android.shared
|
||||
android.library.reference.2=../google-play-services_lib
|
||||
target=android-21
|
||||
android.library.reference.1=../google-play-services_lib
|
||||
android.library.reference.2=../com.sap.sailing.android.shared
|
||||
|
||||
+2
-3
@@ -22,9 +22,8 @@
|
||||
android:text="@string/marks"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<View
|
||||
style="@style/Divider"
|
||||
/>
|
||||
<View style="@style/Divider" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/listMarks"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<string name="title_activity_positioning">Markierungs Position setzen</string>
|
||||
<string name="course_type">Kurstyp</string>
|
||||
<string name="marks">Kursmarkierungen</string>
|
||||
<string name="longitude">Breitengrad</string>
|
||||
@@ -8,5 +9,7 @@
|
||||
<string name="set_position">Position setzen</string>
|
||||
<string name="reset_position">Position zurücksetzen</string>
|
||||
<string name="getting_marks">Empfangen der Markierungen..</string>
|
||||
<string name="set">gesetzt</string>
|
||||
<string name="not_set">nicht gesetzt</string>
|
||||
|
||||
</resources>
|
||||
@@ -1,11 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme for API 11+. This theme completely replaces
|
||||
AppBaseTheme from res/values/styles.xml on API 11+ devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
|
||||
<!-- API 11 theme customizations can go here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -1,12 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme for API 14+. This theme completely replaces
|
||||
AppBaseTheme from BOTH res/values/styles.xml and
|
||||
res/values-v11/styles.xml on API 14+ devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
|
||||
<!-- API 14 theme customizations can go here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="AppTheme" parent="AppTheme.Base">
|
||||
<!-- Customize your theme using Material Design here. -->
|
||||
</style>
|
||||
|
||||
<style name="Divider">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">1dp</item>
|
||||
<item name="android:background">?android:attr/listDivider</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,14 @@
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="white_transparent">#55FFFFFF</color>
|
||||
<color name="white_less_transparent">#CCFFFFFF</color>
|
||||
<color name="green">#00FF00</color>
|
||||
<color name="gray">#333333</color>
|
||||
<color name="darker_gray">#242424</color>
|
||||
|
||||
<color name="colorPrimary">@color/gray</color>
|
||||
<color name="colorPrimaryDark">@color/colorPrimary</color>
|
||||
<color name="colorAccent">@color/green</color>
|
||||
|
||||
</resources>
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
<string name="app_name">SAP Buoy Positioning App</string>
|
||||
<string name="title_activity_start" translatable="false">Buoy Positioning App</string>
|
||||
<string name="title_activity_positioning">Set Mark Position</string>
|
||||
<string name="course_type">Course Type</string>
|
||||
<string name="marks">Marks</string>
|
||||
<string name="longitude">Longitude</string>
|
||||
@@ -9,5 +10,8 @@
|
||||
<string name="set_position">Set Position</string>
|
||||
<string name="reset_position">Reset Position</string>
|
||||
<string name="getting_marks">Getting race marks..</string>
|
||||
<string name="set">set</string>
|
||||
<string name="not_set">not set</string>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -1,26 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme, dependent on API level. This theme is replaced
|
||||
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="android:Theme.Light">
|
||||
<!--
|
||||
Theme customizations available in newer API levels can go in
|
||||
res/values-vXX/styles.xml, while customizations related to
|
||||
backward-compatibility can go here.
|
||||
-->
|
||||
</style>
|
||||
|
||||
<!-- Application theme. -->
|
||||
<style name="AppTheme" parent="AppBaseTheme">
|
||||
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
||||
</style>
|
||||
|
||||
<style name="Divider">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">1dp</item>
|
||||
<item name="android:background">?android:attr/listDivider</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="AppTheme.Base" />
|
||||
|
||||
<style name="AppTheme.Base" parent="Theme.AppCompat">
|
||||
|
||||
<!-- Customize your theme here. -->
|
||||
|
||||
<!-- colorPrimary is used for the default action bar background -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
|
||||
<!-- colorPrimaryDark is used for the status bar -->
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
|
||||
<!-- colorAccent is used as the default value for colorControlActivated which is used to tint widgets -->
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
|
||||
<!-- You can also set colorControlNormal, colorControlActivated colorControlHighlight & colorSwitchThumbNormal. -->
|
||||
|
||||
<item name="windowActionBar">false</item>
|
||||
</style>
|
||||
|
||||
<style name="Divider">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">1dp</item>
|
||||
<item name="android:background">?android:attr/listDivider</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
+16
-2
@@ -1,6 +1,8 @@
|
||||
package com.sap.sailing.android.buoy.positioning.app.adapter;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.support.v4.widget.ResourceCursorAdapter;
|
||||
@@ -9,6 +11,8 @@ import android.widget.TextView;
|
||||
|
||||
import com.sap.sailing.android.buoy.positioning.app.R;
|
||||
import com.sap.sailing.android.buoy.positioning.app.provider.AnalyticsContract;
|
||||
import com.sap.sailing.android.buoy.positioning.app.util.DatabaseHelper;
|
||||
import com.sap.sailing.android.buoy.positioning.app.valueobjects.MarkPingInfo;
|
||||
|
||||
|
||||
public class MarkAdapter extends ResourceCursorAdapter {
|
||||
@@ -22,8 +26,18 @@ public class MarkAdapter extends ResourceCursorAdapter {
|
||||
TextView markName = (TextView) view.findViewById(R.id.mark_name);
|
||||
TextView markSet = (TextView) view.findViewById(R.id.mark_set);
|
||||
String name = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Mark.MARK_NAME));
|
||||
// String setText = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Mark.MARK_NAME));
|
||||
|
||||
String markID = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Mark.MARK_ID));
|
||||
List<MarkPingInfo> markPings = DatabaseHelper.getInstance().getMarkPings(context, markID);
|
||||
String setText = "";
|
||||
if(markPings.isEmpty()){
|
||||
setText = context.getString(R.string.not_set);
|
||||
}
|
||||
else{
|
||||
setText = context.getString(R.string.set);
|
||||
String accuracy = " (" + markPings.get(0).getAccuracy() + ")";
|
||||
setText += accuracy;
|
||||
}
|
||||
markName.setText(name);
|
||||
markSet.setText(setText);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -6,6 +6,7 @@ import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sap.sailing.android.buoy.positioning.app.R;
|
||||
import com.sap.sailing.android.buoy.positioning.app.provider.AnalyticsContract;
|
||||
import com.sap.sailing.android.shared.ui.adapters.AbstractRegattaAdapter;
|
||||
|
||||
public class RegattaAdapter extends AbstractRegattaAdapter {
|
||||
@@ -18,9 +19,8 @@ public class RegattaAdapter extends AbstractRegattaAdapter {
|
||||
public void bindView(View view, Context context, Cursor cursor) {
|
||||
TextView name = (TextView) view.findViewById(R.id.regattaName);
|
||||
if (name != null) {
|
||||
//String text = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Event.EVENT_NAME));
|
||||
//text += " (" + cursor.getString(cursor.getColumnIndex(AnalyticsContract.Competitor.COMPETITOR_DISPLAY_NAME)) + ")";
|
||||
//name.setText(text);
|
||||
String text = cursor.getString(cursor.getColumnIndex(AnalyticsContract.Leaderboard.LEADERBOARD_NAME));
|
||||
name.setText(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -30,8 +30,8 @@ public class AnalyticsDatabase extends SQLiteOpenHelper {
|
||||
String MARK_PINGS = "mark_pings";
|
||||
String CHECKIN_URIS= "checkin_uris";
|
||||
|
||||
String LEADERBOARDS_MARKS_JOINED = "marks LEFT JOIN leaderboards ON " + Tables.MARKS + "." + Mark.MARK_CHECKIN_DIGEST
|
||||
+ " = " + Tables.LEADERBOARDS + "." + Leaderboard.LEADERBOARD_CHECKIN_DIGEST;
|
||||
String LEADERBOARDS_MARKS_JOINED = "marks LEFT JOIN leaderboards ON (" + Tables.MARKS + "." + Mark.MARK_CHECKIN_DIGEST
|
||||
+ " = " + Tables.LEADERBOARDS + "." + Leaderboard.LEADERBOARD_CHECKIN_DIGEST + " )";
|
||||
}
|
||||
|
||||
public AnalyticsDatabase(Context context) {
|
||||
@@ -54,14 +54,14 @@ public class AnalyticsDatabase extends SQLiteOpenHelper {
|
||||
db.execSQL("CREATE TABLE " + Tables.MARKS + " ("
|
||||
+ BaseColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
|
||||
+ MarkColums.MARK_CHECKIN_DIGEST + " TEXT,"
|
||||
+ MarkColums.MARK_ID + " TEXT,"
|
||||
+ MarkColums.MARK_ID + " INTEGER,"
|
||||
+ MarkColums.MARK_NAME + " TEXT,"
|
||||
+ MarkColums.MARK_TYPE + " TEXT,"
|
||||
+ MarkColums.MARK_CLASS_NAME + " TEXT );");
|
||||
|
||||
db.execSQL("CREATE TABLE " + Tables.MARK_PINGS + " ("
|
||||
+ BaseColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
|
||||
+ MarkPingColumns.MARK_ID + " TEXT,"
|
||||
+ MarkPingColumns.MARK_ID + " INTEGER,"
|
||||
+ MarkPingColumns.MARK_PING_TIMESTAMP + " TEXT,"
|
||||
+ MarkPingColumns.MARK_PING_LATITUDE + " TEXT,"
|
||||
+ MarkPingColumns.MARK_PING_LONGITUDE + " TEXT,"
|
||||
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
package com.sap.sailing.android.buoy.positioning.app.ui.activities;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
|
||||
import com.sap.sailing.android.buoy.positioning.app.R;
|
||||
import com.sap.sailing.android.buoy.positioning.app.ui.fragments.BuoyFragment;
|
||||
import com.sap.sailing.android.buoy.positioning.app.util.DatabaseHelper;
|
||||
import com.sap.sailing.android.buoy.positioning.app.valueobjects.MarkInfo;
|
||||
import com.sap.sailing.android.buoy.positioning.app.valueobjects.MarkPingInfo;
|
||||
|
||||
public class PositioningActivity extends BaseActivity {
|
||||
|
||||
private MarkInfo markInfo;
|
||||
private MarkPingInfo markPing;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Intent intent = getIntent();
|
||||
String markerID = intent.getExtras().getString(getString(R.string.mark_id));
|
||||
String checkinDigest = intent.getExtras().getString(getString(R.string.checkin_digest));
|
||||
List<MarkInfo> marks = DatabaseHelper.getInstance().getMarks(this, checkinDigest);
|
||||
for(MarkInfo mark : marks)
|
||||
{
|
||||
if(mark.getId().equals(markerID))
|
||||
{
|
||||
markInfo = mark;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(markInfo != null)
|
||||
{
|
||||
List<MarkPingInfo> markPings = DatabaseHelper.getInstance().getMarkPings(this, markerID);
|
||||
if(!markPings.isEmpty())
|
||||
{
|
||||
setMarkPing(markPings.get(0));
|
||||
}
|
||||
}
|
||||
setContentView(R.layout.fragment_container);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
if (toolbar != null) {
|
||||
setSupportActionBar(toolbar);
|
||||
toolbar.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
}
|
||||
replaceFragment(R.id.content_frame, new BuoyFragment());
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
toolbar.setNavigationIcon(R.drawable.sap_logo_64_sq);
|
||||
toolbar.setPadding(20, 0, 0, 0);
|
||||
getSupportActionBar().setTitle(getString(R.string.title_activity_positioning));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
public MarkInfo getMarkInfo() {
|
||||
return markInfo;
|
||||
}
|
||||
|
||||
public void setMarkInfo(MarkInfo markInfo) {
|
||||
this.markInfo = markInfo;
|
||||
}
|
||||
|
||||
public MarkPingInfo getMarkPing() {
|
||||
return markPing;
|
||||
}
|
||||
|
||||
public void setMarkPing(MarkPingInfo markPing) {
|
||||
this.markPing = markPing;
|
||||
}
|
||||
}
|
||||
+69
@@ -1,9 +1,61 @@
|
||||
package com.sap.sailing.android.buoy.positioning.app.ui.activities;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
|
||||
import com.sap.sailing.android.buoy.positioning.app.R;
|
||||
import com.sap.sailing.android.buoy.positioning.app.ui.fragments.RegattaFragment;
|
||||
import com.sap.sailing.android.buoy.positioning.app.util.DatabaseHelper;
|
||||
import com.sap.sailing.android.buoy.positioning.app.valueobjects.MarkInfo;
|
||||
import com.sap.sailing.android.shared.data.AbstractCheckinData;
|
||||
import com.sap.sailing.android.shared.ui.activities.AbstractRegattaActivity;
|
||||
|
||||
public class RegattaActivity extends AbstractRegattaActivity{
|
||||
|
||||
private String leaderboardName;
|
||||
private String checkinDigest;
|
||||
private List<MarkInfo> marks;
|
||||
// private CheckinUrlInfo checkinUrl;
|
||||
|
||||
// private AppPreferences prefs;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
//prefs = new AppPreferences(this);
|
||||
Intent intent = getIntent();
|
||||
|
||||
setMarks(new ArrayList<MarkInfo>());
|
||||
|
||||
checkinDigest = intent.getStringExtra(getString(R.string.checkin_digest));
|
||||
checkinDigest = intent.getStringExtra(getString(R.string.leaderboard_name));
|
||||
|
||||
// checkinUrl = DatabaseHelper.getInstance().getCheckinUrl(this, checkinDigest);
|
||||
// manager = new CheckinManager(checkinUrl.urlString, this);
|
||||
|
||||
setMarks(DatabaseHelper.getInstance().getMarks(this, checkinDigest));
|
||||
|
||||
setContentView(R.layout.fragment_container);
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
if (toolbar != null) {
|
||||
setSupportActionBar(toolbar);
|
||||
toolbar.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
}
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
toolbar.setNavigationIcon(R.drawable.sap_logo_64_sq);
|
||||
toolbar.setPadding(20, 0, 0, 0);
|
||||
getSupportActionBar().setTitle(leaderboardName);
|
||||
}
|
||||
RegattaFragment regattaFragment = new RegattaFragment();
|
||||
replaceFragment(R.id.content_frame, regattaFragment);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCheckinDataAvailable(AbstractCheckinData arg0) {
|
||||
@@ -16,5 +68,22 @@ public class RegattaActivity extends AbstractRegattaActivity{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
leaderboardName = (String) getIntent().getExtras().get(getString(R.string.leaderboard_name));
|
||||
setTitle(leaderboardName);
|
||||
}
|
||||
|
||||
|
||||
public List<MarkInfo> getMarks() {
|
||||
return marks;
|
||||
}
|
||||
|
||||
|
||||
public void setMarks(List<MarkInfo> marks) {
|
||||
this.marks = marks;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -5,11 +5,11 @@ import android.os.Bundle;
|
||||
|
||||
import com.sap.sailing.android.buoy.positioning.app.R;
|
||||
import com.sap.sailing.android.buoy.positioning.app.ui.fragments.HomeFragment;
|
||||
import com.sap.sailing.android.shared.ui.activities.AbstractBaseActivity;
|
||||
import com.sap.sailing.android.shared.ui.activities.AbstractStartActivity;
|
||||
import com.sap.sailing.android.ui.fragments.AbstractHomeFragment;
|
||||
|
||||
|
||||
public class StartActivity extends AbstractBaseActivity {
|
||||
public class StartActivity extends AbstractStartActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -32,9 +32,9 @@ public class StartActivity extends AbstractBaseActivity {
|
||||
return homeFragment;
|
||||
}
|
||||
|
||||
public void startRegatta(String checkinDigest) {
|
||||
public void startRegatta(String leaderboardName) {
|
||||
Intent intent = new Intent(this, RegattaActivity.class);
|
||||
intent.putExtra(getString(R.string.checkin_digest), checkinDigest);
|
||||
intent.putExtra(getString(R.string.leaderboard_name), leaderboardName);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
package com.sap.sailing.android.buoy.positioning.app.ui.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.sap.sailing.android.buoy.positioning.app.R;
|
||||
import com.sap.sailing.android.buoy.positioning.app.ui.activities.PositioningActivity;
|
||||
import com.sap.sailing.android.buoy.positioning.app.valueobjects.MarkInfo;
|
||||
import com.sap.sailing.android.buoy.positioning.app.valueobjects.MarkPingInfo;
|
||||
import com.sap.sailing.android.shared.ui.customviews.OpenSansButton;
|
||||
import com.sap.sailing.android.shared.ui.customviews.OpenSansTextView;
|
||||
import com.sap.sailing.android.ui.fragments.BaseFragment;
|
||||
|
||||
|
||||
public class BuoyFragment extends BaseFragment{
|
||||
private OpenSansTextView markHeaderTextView;
|
||||
private OpenSansTextView lattitudeTextView;
|
||||
private OpenSansTextView longitudeTextView;
|
||||
private OpenSansTextView accuracyTextView;
|
||||
private OpenSansButton setPositionButton;
|
||||
private OpenSansButton resetPostionButton;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
View view = inflater.inflate(R.layout.fragment_buoy_postion_detail, container, false);
|
||||
markHeaderTextView = (OpenSansTextView) view.findViewById(R.id.mark_header);
|
||||
lattitudeTextView = (OpenSansTextView) view.findViewById(R.id.marker_gps_latitude);
|
||||
longitudeTextView = (OpenSansTextView) view.findViewById(R.id.marker_gps_longitude);
|
||||
accuracyTextView = (OpenSansTextView) view.findViewById(R.id.marker_gps_accuracy);
|
||||
Clicklistener clicklistener = new Clicklistener();
|
||||
|
||||
setPositionButton = (OpenSansButton) view.findViewById(R.id.marker_set_position_button);
|
||||
setPositionButton.setOnClickListener(clicklistener);
|
||||
|
||||
resetPostionButton = (OpenSansButton) view.findViewById(R.id.marker_reset_position_button);
|
||||
resetPostionButton.setOnClickListener(clicklistener);
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
MarkInfo mark = ((PositioningActivity)getActivity()).getMarkInfo();
|
||||
MarkPingInfo markPing = ((PositioningActivity)getActivity()).getMarkPing();
|
||||
if(mark != null)
|
||||
{
|
||||
markHeaderTextView.setText(mark.getName());
|
||||
if(markPing != null)
|
||||
{
|
||||
lattitudeTextView.setText(markPing.getLattitude());
|
||||
longitudeTextView.setText(markPing.getLongitude());
|
||||
accuracyTextView.setText("~" + markPing.getAccuracy());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class Clicklistener implements OnClickListener{
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if(id == R.id.marker_set_position_button)
|
||||
{
|
||||
// Set Position
|
||||
}
|
||||
else if(id == R.id.marker_reset_position_button)
|
||||
{
|
||||
// Reset position
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+102
-72
@@ -15,19 +15,24 @@ import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.sap.sailing.android.buoy.positioning.app.BuildConfig;
|
||||
import com.sap.sailing.android.buoy.positioning.app.R;
|
||||
import com.sap.sailing.android.buoy.positioning.app.adapter.RegattaAdapter;
|
||||
import com.sap.sailing.android.buoy.positioning.app.provider.AnalyticsContract;
|
||||
import com.sap.sailing.android.buoy.positioning.app.ui.activities.RegattaActivity;
|
||||
import com.sap.sailing.android.buoy.positioning.app.ui.activities.StartActivity;
|
||||
import com.sap.sailing.android.buoy.positioning.app.util.AppPreferences;
|
||||
import com.sap.sailing.android.buoy.positioning.app.util.CheckinManager;
|
||||
import com.sap.sailing.android.buoy.positioning.app.util.DatabaseHelper;
|
||||
import com.sap.sailing.android.buoy.positioning.app.valueobjects.CheckinData;
|
||||
import com.sap.sailing.android.shared.data.AbstractCheckinData;
|
||||
import com.sap.sailing.android.shared.logging.ExLog;
|
||||
import com.sap.sailing.android.shared.ui.activities.CheckinDataActivity;
|
||||
import com.sap.sailing.android.ui.fragments.AbstractHomeFragment;
|
||||
|
||||
public class HomeFragment extends AbstractHomeFragment implements LoaderCallbacks<Cursor> {
|
||||
public class HomeFragment extends AbstractHomeFragment implements
|
||||
LoaderCallbacks<Cursor> {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private final static String TAG = HomeFragment.class.getName();
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
@@ -53,99 +58,124 @@ public class HomeFragment extends AbstractHomeFragment implements LoaderCallback
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getLoaderManager().restartLoader(REGATTA_LOADER, null, this);
|
||||
|
||||
String lastQRCode = prefs.getLastScannedQRCode();
|
||||
if (lastQRCode != null) {
|
||||
handleQRCode(lastQRCode);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getLoaderManager().restartLoader(REGATTA_LOADER, null, this);
|
||||
|
||||
String lastQRCode = prefs.getLastScannedQRCode();
|
||||
if (lastQRCode != null) {
|
||||
handleQRCode(lastQRCode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayUserConfirmationScreen(AbstractCheckinData data) {
|
||||
// TODO Auto-generated method stub
|
||||
CheckinData chData = (CheckinData) data;
|
||||
checkinWithApiAndStartRegattaActivity(chData);
|
||||
|
||||
}
|
||||
|
||||
private void checkinWithApiAndStartRegattaActivity(CheckinData checkinData) {
|
||||
try {
|
||||
DatabaseHelper.getInstance().storeCheckinRow(getActivity(),
|
||||
checkinData.marks, checkinData.getLeaderboard(),
|
||||
checkinData.getCheckinUrl());
|
||||
adapter.notifyDataSetChanged();
|
||||
|
||||
} catch (DatabaseHelper.GeneralDatabaseHelperException e) {
|
||||
ExLog.e(getActivity(), TAG,
|
||||
"Batch insert failed: " + e.getMessage());
|
||||
((StartActivity) getActivity()).displayDatabaseError();
|
||||
return;
|
||||
}
|
||||
|
||||
if (BuildConfig.DEBUG) {
|
||||
ExLog.i(getActivity(), TAG,
|
||||
"Batch-insert of checkinData completed.");
|
||||
}
|
||||
((StartActivity) getActivity())
|
||||
.startRegatta(checkinData.leaderboardName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleScannedOrUrlMatchedUri(Uri uri) {
|
||||
CheckinManager manager = new CheckinManager(uri.toString(), (CheckinDataActivity) getActivity());
|
||||
CheckinManager manager = new CheckinManager(uri.toString(),
|
||||
(CheckinDataActivity) getActivity());
|
||||
manager.callServerAndGenerateCheckinData();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Start regatta activity.
|
||||
*
|
||||
* @param checkinDigest
|
||||
*/
|
||||
private void startRegatta(String checkinDigest) {
|
||||
Intent intent = new Intent(getActivity(), RegattaActivity.class);
|
||||
intent.putExtra(getString(R.string.checkin_digest), checkinDigest);
|
||||
getActivity().startActivity(intent);
|
||||
}
|
||||
* Start regatta activity.
|
||||
*
|
||||
* @param leaderboardName
|
||||
* @param checkinDigest2
|
||||
*/
|
||||
private void startRegatta(String leaderboardName, String checkinDigest) {
|
||||
Intent intent = new Intent(getActivity(), RegattaActivity.class);
|
||||
intent.putExtra(getString(R.string.leaderboard_name), leaderboardName);
|
||||
intent.putExtra(getString(R.string.checkin_digest), checkinDigest);
|
||||
getActivity().startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Loader<Cursor> onCreateLoader(int loaderId, Bundle bundle) {
|
||||
switch (loaderId) {
|
||||
case REGATTA_LOADER:
|
||||
// TODO: FIX projection String
|
||||
String[] projection = new String[] { "events.event_checkin_digest", "events.event_id", "events._id",
|
||||
"events.event_name", "events.event_server", "competitors.competitor_display_name",
|
||||
"competitors.competitor_id", "leaderboards.leaderboard_name",
|
||||
"competitors.competitor_country_code", "competitors.competitor_sail_id" };
|
||||
return new CursorLoader(getActivity(), AnalyticsContract.LeaderboardsMarksJoined.CONTENT_URI,
|
||||
projection, null, null, null);
|
||||
@Override
|
||||
public Loader<Cursor> onCreateLoader(int loaderId, Bundle bundle) {
|
||||
switch (loaderId) {
|
||||
case REGATTA_LOADER:
|
||||
return new CursorLoader(getActivity(),
|
||||
AnalyticsContract.LeaderboardsMarksJoined.CONTENT_URI,
|
||||
null, null, null, null);
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
|
||||
switch (loader.getId()) {
|
||||
case REGATTA_LOADER:
|
||||
adapter.changeCursor(cursor);
|
||||
break;
|
||||
@Override
|
||||
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
|
||||
switch (loader.getId()) {
|
||||
case REGATTA_LOADER:
|
||||
adapter.changeCursor(cursor);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<Cursor> loader) {
|
||||
switch (loader.getId()) {
|
||||
case REGATTA_LOADER:
|
||||
adapter.changeCursor(null);
|
||||
break;
|
||||
@Override
|
||||
public void onLoaderReset(Loader<Cursor> loader) {
|
||||
switch (loader.getId()) {
|
||||
case REGATTA_LOADER:
|
||||
adapter.changeCursor(null);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private class ItemClickListener implements OnItemClickListener {
|
||||
private class ItemClickListener implements OnItemClickListener {
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position,
|
||||
long id) {
|
||||
|
||||
if (position < 1) // tapped header
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (position < 1) // tapped header
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// -1, because there's a header row
|
||||
Cursor cursor = (Cursor) adapter.getItem(position - 1);
|
||||
// -1, because there's a header row
|
||||
Cursor cursor = (Cursor) adapter.getItem(position - 1);
|
||||
String checkinDigest = cursor.getString(cursor.getColumnIndex("leaderboard_checkin_digest"));
|
||||
|
||||
String checkinDigest = cursor.getString(cursor.getColumnIndex("event_checkin_digest"));
|
||||
startRegatta(checkinDigest);
|
||||
}
|
||||
}
|
||||
String leaderboardName = cursor.getString(cursor
|
||||
.getColumnIndex("leaderboard_name"));
|
||||
startRegatta(leaderboardName, checkinDigest);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
package com.sap.sailing.android.buoy.positioning.app.ui.fragments;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.LoaderManager.LoaderCallbacks;
|
||||
import android.support.v4.content.CursorLoader;
|
||||
import android.support.v4.content.Loader;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.sap.sailing.android.buoy.positioning.app.R;
|
||||
import com.sap.sailing.android.buoy.positioning.app.adapter.MarkAdapter;
|
||||
import com.sap.sailing.android.buoy.positioning.app.provider.AnalyticsContract;
|
||||
import com.sap.sailing.android.buoy.positioning.app.ui.activities.PositioningActivity;
|
||||
import com.sap.sailing.android.ui.fragments.BaseFragment;
|
||||
|
||||
public class RegattaFragment extends BaseFragment implements LoaderCallbacks<Cursor>{
|
||||
private static final int MARKER_LOADER = 1;
|
||||
private MarkAdapter adapter;
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
|
||||
View view = inflater.inflate(R.layout.fragment_buoy_postion_overview, container, false);
|
||||
ListView markListView = (ListView) view.findViewById(R.id.listMarks);
|
||||
adapter = new MarkAdapter(getActivity(), R.layout.mark_listview_row, null, 0);
|
||||
markListView.setAdapter(adapter);
|
||||
markListView.setOnItemClickListener(new ItemClickListener());
|
||||
getLoaderManager().initLoader(MARKER_LOADER, null, this);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
getLoaderManager().restartLoader(MARKER_LOADER, null, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Loader<Cursor> onCreateLoader(int loaderId, Bundle bundle) {
|
||||
switch (loaderId) {
|
||||
case MARKER_LOADER:
|
||||
return new CursorLoader(getActivity(), AnalyticsContract.LeaderboardsMarksJoined.CONTENT_URI,
|
||||
null, null, null, null);
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
|
||||
switch (loader.getId()) {
|
||||
case MARKER_LOADER:
|
||||
adapter.changeCursor(cursor);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoaderReset(Loader<Cursor> loader) {
|
||||
switch (loader.getId()) {
|
||||
case MARKER_LOADER:
|
||||
adapter.changeCursor(null);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private class ItemClickListener implements OnItemClickListener {
|
||||
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
if (position < 1) // tapped header
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Cursor cursor = (Cursor) adapter.getItem(position);
|
||||
|
||||
String markerID = cursor.getString(cursor.getColumnIndex("mark_id"));
|
||||
String checkinDigest = cursor.getString(cursor.getColumnIndex("mark_checkin_digest"));
|
||||
Intent intent = new Intent(getActivity(), PositioningActivity.class);
|
||||
intent.putExtra(getString(R.string.mark_id), markerID);
|
||||
intent.putExtra(getString(R.string.checkin_digest), checkinDigest);
|
||||
getActivity().startActivity(intent);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -155,7 +155,7 @@ public class CheckinManager {
|
||||
@Override
|
||||
public void performAction(JSONObject response) {
|
||||
try {
|
||||
JSONArray markArray = response.getJSONArray("");
|
||||
JSONArray markArray = response.getJSONArray("marks");
|
||||
List<MarkInfo> marks = new ArrayList<MarkInfo>();
|
||||
for(int i = 0; i< markArray.length(); i++){
|
||||
JSONObject jsonMark = (JSONObject) markArray.get(i);
|
||||
@@ -192,6 +192,7 @@ public class CheckinManager {
|
||||
private void saveCheckinDataAndNotifyListeners(URLData urlData, String leaderboardName) {
|
||||
CheckinData data = new CheckinData();
|
||||
data.leaderboardName = leaderboardName;
|
||||
data.marks = urlData.marks;
|
||||
data.deviceUid = urlData.deviceUuid
|
||||
.getStringRepresentation();
|
||||
data.uriString = urlData.uriStr;
|
||||
@@ -255,8 +256,6 @@ public class CheckinManager {
|
||||
public String server;
|
||||
public int port;
|
||||
public String hostWithPort;
|
||||
public String checkinURLStr;
|
||||
public String eventId;
|
||||
public List<MarkInfo> marks;
|
||||
public String leaderboardName;
|
||||
public DeviceIdentifier deviceUuid;
|
||||
|
||||
+3
-3
@@ -89,14 +89,14 @@ public class DatabaseHelper {
|
||||
return marks;
|
||||
}
|
||||
|
||||
public List<MarkPingInfo> getMarkPings(Context context, MarkInfo markInfo){
|
||||
public List<MarkPingInfo> getMarkPings(Context context, String markID){
|
||||
List<MarkPingInfo> marks = new ArrayList<MarkPingInfo>();
|
||||
Cursor mpc = context.getContentResolver().query(Mark.CONTENT_URI, null,
|
||||
MarkPing.MARK_ID + " = \"" + markInfo.getId() + "\"", null, null);
|
||||
MarkPing.MARK_ID + " = \"" + markID + "\"", null, MarkPing.MARK_PING_TIMESTAMP + " DSC");
|
||||
mpc.moveToFirst();
|
||||
while (!mpc.isAfterLast()) {
|
||||
MarkPingInfo markPingInfo = new MarkPingInfo();
|
||||
markPingInfo.setMarkId(markInfo.getId());
|
||||
markPingInfo.setMarkId(markID);
|
||||
markPingInfo.setTimestamp(mpc.getInt((mpc.getColumnIndex(MarkPing.MARK_PING_TIMESTAMP))));
|
||||
markPingInfo.setLongitude(mpc.getString((mpc.getColumnIndex(MarkPing.MARK_PING_LONGITUDE))));
|
||||
markPingInfo.setLattitude(mpc.getString((mpc.getColumnIndex(MarkPing.MARK_PING_LATITUDE))));
|
||||
|
||||
+8
@@ -6,6 +6,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
import java.util.List;
|
||||
|
||||
import com.sap.sailing.android.shared.data.AbstractCheckinData;
|
||||
import com.sap.sailing.android.shared.data.CheckinUrlInfo;
|
||||
import com.sap.sailing.android.shared.data.LeaderboardInfo;
|
||||
|
||||
public class CheckinData extends AbstractCheckinData{
|
||||
@@ -33,4 +34,11 @@ public class CheckinData extends AbstractCheckinData{
|
||||
leaderboard.checkinDigest = checkinDigest;
|
||||
return leaderboard;
|
||||
}
|
||||
|
||||
public CheckinUrlInfo getCheckinUrl(){
|
||||
CheckinUrlInfo checkinUrlInfo = new CheckinUrlInfo();
|
||||
checkinUrlInfo.urlString = uriString;
|
||||
checkinUrlInfo.checkinDigest = checkinDigest;
|
||||
return checkinUrlInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,3 +12,4 @@ include ":java:org.json.simple"
|
||||
include ":mobile:com.sap.sailing.android.shared"
|
||||
include ":mobile:com.sap.sailing.android.tracking.app"
|
||||
include ":mobile:com.sap.sailing.racecommittee.app"
|
||||
include ":mobile:com.sap.sailing.buoy.positioning.app"
|
||||
|
||||
Reference in New Issue
Block a user