|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectContentProvider
nl.sogeti.android.gpstracker.db.GPStrackingProvider
public class GPStrackingProvider
Goal of this Content Provider is to make the GPS Tracking information uniformly available to this application and even other applications. The GPS-tracking database can hold, tracks, segments or waypoints
A track is an actual route taken from start to finish. All the GPS locations collected are waypoints. Waypoints taken in sequence without loss of GPS-signal are considered connected and are grouped in segments. A route is build up out of 1 or more segments.
For example:
content://nl.sogeti.android.gpstracker/tracks
is the URI that returns all the stored tracks or starts a new track on insert
content://nl.sogeti.android.gpstracker/tracks/2
is the URI string that would return a single result row, the track with ID = 23.
content://nl.sogeti.android.gpstracker/tracks/2/segments is the URI that returns
all the stored segments of a track with ID = 2 or starts a new segment on insert
content://nl.sogeti.android.gpstracker/tracks/2/waypoints is the URI that returns
all the stored waypoints of a track with ID = 2
content://nl.sogeti.android.gpstracker/tracks/2/segments is the URI that returns
all the stored segments of a track with ID = 2
content://nl.sogeti.android.gpstracker/tracks/2/segments/3 is
the URI string that would return a single result row, the segment with ID = 3 of a track with ID = 2 .
content://nl.sogeti.android.gpstracker/tracks/2/segments/1/waypoints is the URI that
returns all the waypoints of a segment 1 of track 2.
content://nl.sogeti.android.gpstracker/tracks/2/segments/1/waypoints/52 is the URI string that
would return a single result row, the waypoint with ID = 52
Media is stored under a waypoint and may be queried as:
content://nl.sogeti.android.gpstracker/tracks/2/segments/3/waypoints/22/media
All media for a segment can be queried with:
content://nl.sogeti.android.gpstracker/tracks/2/segments/3/media
All media for a track can be queried with:
content://nl.sogeti.android.gpstracker/tracks/2/media
The whole set of collected media may be queried as:
content://nl.sogeti.android.gpstracker/media
A single media is stored with an ID, for instance ID = 12:
content://nl.sogeti.android.gpstracker/media/12
| Constructor Summary | |
|---|---|
GPStrackingProvider()
|
|
| Method Summary | |
|---|---|
int |
delete(Uri uri,
String selection,
String[] selectionArgs)
(non-Javadoc) |
String |
getType(Uri uri)
(non-Javadoc) |
Uri |
insert(Uri uri,
ContentValues values)
(non-Javadoc) |
boolean |
onCreate()
(non-Javadoc) |
Cursor |
query(Uri uri,
String[] projection,
String selection,
String[] selectionArgs,
String sortOrder)
(non-Javadoc) |
int |
update(Uri uri,
ContentValues givenValues,
String selection,
String[] selectionArgs)
(non-Javadoc) |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GPStrackingProvider()
| Method Detail |
|---|
public int delete(Uri uri,
String selection,
String[] selectionArgs)
ContentProviderpublic String getType(Uri uri)
ContentProvider
public Uri insert(Uri uri,
ContentValues values)
ContentProviderpublic boolean onCreate()
ContentProvider
public Cursor query(Uri uri,
String[] projection,
String selection,
String[] selectionArgs,
String sortOrder)
ContentProvider
public int update(Uri uri,
ContentValues givenValues,
String selection,
String[] selectionArgs)
ContentProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||