mercredi 7 janvier 2015

What data should i save in the Sqlite Database from my app?

Okay, in my app I can add custom markers with images taken from the camera intent, then that image is then displayed full screen when the user taps on the marker. Now for each marker added i had to use :



private Map<String, Bitmap> myMarkers;


then I needed to get the ID of the marker :



private String markerId;
....
markerId = marker.getId();


Then return that image to that specific marker:



Bitmap bitmap = myMarkers.get(marker.getId());
markerIcon.setImageBitmap(bitmap);


All good and working, now my question is what do i need to save to SQlite database? Is it the myMarkers , the markerID or the bitmap or the imageData (seen in code below)?



baos = new ByteArrayOutputStream();
bitmap.compress(CompressFormat.PNG, 100, baos);
imageData = baos.toByteArray();


Or do I need to save all of them to the database?


Any help on this will be much appreciated!


Aucun commentaire:

Enregistrer un commentaire