mobile/src/main/java/drost_stein/fbg/hsbo/de/urbantrackingapp/MainActivity.java
private void initializeTrackPointFeatureService() {
        mFeatureServiceTable.setFeatureRequestMode(GeodatabaseFeatureServiceTable.FeatureRequestMode.MANUAL_CACHE);
        mFeatureServiceTable.initialize(
                new CallbackListener<GeodatabaseFeatureServiceTable.Status>() {

                    @Override
                    public void onError(Throwable e) {
                        String error = mFeatureServiceTable.getInitializationError();
                        Toast toast = Toast.makeText(getApplicationContext(), error, Toast.LENGTH_LONG);
                        toast.show();
                    }

                    @Override
                    public void onCallback(GeodatabaseFeatureServiceTable.Status status) {
                        if (status == GeodatabaseFeatureServiceTable.Status.INITIALIZED) {
                            QueryParameters qParameters = new QueryParameters();
                            //String whereClause = "user_id=" + mUserID;
                            String whereClause = "user_id='" + mUserID + "'";
                            qParameters.setReturnGeometry(true);
                            qParameters.setWhere(whereClause);
                            mFeatureServiceTable.populateFromService(qParameters, true, new CallbackListener<Boolean>() {
                                @Override
                                public void onCallback(Boolean aBoolean) {
                                    if (aBoolean) {
                                        mTrackPointFeatureLayer = new FeatureLayer(mFeatureServiceTable);
                                        trackPointsource = new TrackPointSource(mFeatureServiceTable);
                                        mMapView.addLayer(mTrackPointFeatureLayer);
                                    }
                                }

                                @Override
                                public void onError(Throwable throwable) {
                                    String error = mFeatureServiceTable.getInitializationError();
                                    Toast toast = Toast.makeText(getApplicationContext(), error, Toast.LENGTH_LONG);
                                    toast.show();
                                }
                            });
                        }
                    }
                });
    }
/**
     * Adds the Feature-Service for trackpoints to the map
     */
Adds the Feature-Service for trackpoints to the map
Adds the Feature - Service for trackpoints to the map
private void initializeTrackPointFeatureService() {
        mFeatureServiceTable.setFeatureRequestMode(GeodatabaseFeatureServiceTable.FeatureRequestMode.MANUAL_CACHE);
        mFeatureServiceTable.initialize(
                new CallbackListener<GeodatabaseFeatureServiceTable.Status>() {
                    @Override
                    public void onError(Throwable e) {
                        String error = mFeatureServiceTable.getInitializationError();
                        Toast toast = Toast.makeText(getApplicationContext(), error, Toast.LENGTH_LONG);
                        toast.show();
                    }
                    @Override
                    public void onCallback(GeodatabaseFeatureServiceTable.Status status) {
                        if (status == GeodatabaseFeatureServiceTable.Status.INITIALIZED) {
                            QueryParameters qParameters = new QueryParameters();
                            String whereClause = "user_id='" + mUserID + "'";
                            qParameters.setReturnGeometry(true);
                            qParameters.setWhere(whereClause);
                            mFeatureServiceTable.populateFromService(qParameters, true, new CallbackListener<Boolean>() {
                                @Override
                                public void onCallback(Boolean aBoolean) {
                                    if (aBoolean) {
                                        mTrackPointFeatureLayer = new FeatureLayer(mFeatureServiceTable);
                                        trackPointsource = new TrackPointSource(mFeatureServiceTable);
                                        mMapView.addLayer(mTrackPointFeatureLayer);
                                    }
                                }
                                @Override
                                public void onError(Throwable throwable) {
                                    String error = mFeatureServiceTable.getInitializationError();
                                    Toast toast = Toast.makeText(getApplicationContext(), error, Toast.LENGTH_LONG);
                                    toast.show();
                                }
                            });
                        }
                    }
                });
    }
private void initializeTrackPointFeatureService ( ) { mFeatureServiceTable . setFeatureRequestMode ( GeodatabaseFeatureServiceTable . FeatureRequestMode . MANUAL_CACHE ) ; mFeatureServiceTable . initialize ( new CallbackListener < GeodatabaseFeatureServiceTable . Status > ( ) { @ Override public void onError ( Throwable e ) { String error = mFeatureServiceTable . getInitializationError ( ) ; Toast toast = Toast . makeText ( getApplicationContext ( ) , error , Toast . LENGTH_LONG ) ; toast . show ( ) ; } @ Override public void onCallback ( GeodatabaseFeatureServiceTable . Status status ) { if ( status == GeodatabaseFeatureServiceTable . Status . INITIALIZED ) { QueryParameters qParameters = new QueryParameters ( ) ; String whereClause = "user_id='" + mUserID + "'" ; qParameters . setReturnGeometry ( true ) ; qParameters . setWhere ( whereClause ) ; mFeatureServiceTable . populateFromService ( qParameters , true , new CallbackListener < Boolean > ( ) { @ Override public void onCallback ( Boolean aBoolean ) { if ( aBoolean ) { mTrackPointFeatureLayer = new FeatureLayer ( mFeatureServiceTable ) ; trackPointsource = new TrackPointSource ( mFeatureServiceTable ) ; mMapView . addLayer ( mTrackPointFeatureLayer ) ; } } @ Override public void onError ( Throwable throwable ) { String error = mFeatureServiceTable . getInitializationError ( ) ; Toast toast = Toast . makeText ( getApplicationContext ( ) , error , Toast . LENGTH_LONG ) ; toast . show ( ) ; } } ) ; } } } ) ; }
Adds the Feature-Service for trackpoints to the map
Adds the Feature - Service for trackpoints to the map
//String whereClause = "user_id=" + mUserID;