dmbreaker / osmtracker-android

Automatically exported from code.google.com/p/osmtracker-android
GNU General Public License v3.0
0 stars 0 forks source link

Photos are not saved to output folder with names other than that in <wpt><link> #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
(Thanks for adding text annotation and the trace view feature, BTW. Lovely
work, these seem completely fine so far for me at least! It's be nice to
see a cached map as a background for the trace in future releases ;-))

What steps will reproduce the problem?
1. Go out and make a track
2. Take photos while tracking using the osmtracker-android Take Photo button

What is the expected output? What do you see instead?

I expect to find the pictures in the same output folder as the .gpx file.
Instead they're stored as <SDcard-mountpoint>/DCIM/100MEDIA/IMAGnnnn.jpg,
which is the same pathname format that the Camera app on my phone uses
normally. I have to manually locate the files and move them to the right
folder.

Inside the output GPX file, those <wpt>s of <type>Picture</type> have
<link> elements which refer to files of different names to what's been
saved, e.g. 2010-03-26_08-30-52.jpg rather than IMAG0464.jpg. When the GPX
file is opened in JOSM, the waypoint icon looks fine, but when clicked the
dialog is empty, just a small button in the middle (is this supposed to
show the photo?)

TBH, rather than a <link>, I'd be happy with just a directory full of
(geotagged) photos, and a GPX file. AgPifoJ or newer JOSMs work quite well
with this setup IMX. But correct links would be gravy.

What version of the product are you using? On what operating system?

OSMTracker for Android v0.3.3
UK Orange HTC Hero running Android 1.5

Original issue reported on code.google.com by a.t.chadwick on 26 Mar 2010 at 11:19

GoogleCodeExporter commented 9 years ago
Normally photos should be in the GPX folder, it's the case in my device (HTC 
Magic
1.6 - Vodafone Australia) and in the 1.5 emulator.

OSMTracker relies on the device built-in photo application to take photos. Do 
you
know if your phone has the standard android camera application, or a customized 
one
by Orange UK ?
The standard photo app is very basic and looks like that on 1.5 (The checkered
surface represents what the camera views, in the emulator):
http://osmtracker-android.googlecode.com/svn/trunk/wiki/images/camera-app-1.5/ca
mera-1.5_1.png
http://osmtracker-android.googlecode.com/svn/trunk/wiki/images/camera-app-1.5/ca
mera-1.5_2.png

Original comment by nguillau...@gmail.com on 26 Mar 2010 at 12:32

GoogleCodeExporter commented 9 years ago
http://dailymobile.se/2009/07/22/htc-hero-hands-on-london-launch/ and
http://www.youtube.com/watch?v=EloX_Dt3cT0 is similar to what I see: it's 
clearly a
different app from the default Android one.

The UI for MediaStore.ACTION_IMAGE_CAPTURE is subtly different from the standard
HTC/Orange/whoever Camera app experience when taking from osmtracker-android. I 
don't
get the TR video/camera toggle button or the BR go-to-gallery button when 
taking in
osmtracker-android, and the GPS lock icon in the TL corner is a little 
different from
the one used in the "real" Camera app [a little target rather than a picture of 
a
satellite dish: but I may be wrong here]. I do get a black "press trackball to 
take
photo" speech balloon, and after taking I see a review bar along the bottom 
with two
buttons, Done and retake (an icon). Both do what I'd expect.

Looking at the code near
http://code.google.com/p/osmtracker-android/source/browse/trunk/src/me/guillaumi
n/android/osmtracker/activity/TrackLogger.java?r=96#349
it seems that OUTPUT_EXTRA is being ignored. Annoying. All the other uses of
OUTPUT_EXTRA I've seen around the net explicitly pass URIs as strings there: 
could
HTC's camera app be fussy here? Perhaps you're supposed to rummage in the extras
field of the returned intent after the fact to discover where the hell the 
camera
sent it. I'll try to play with this later on and see what's happening.

Original comment by a.t.chadwick on 26 Mar 2010 at 2:30

GoogleCodeExporter commented 9 years ago
Wow, thanks for this detailed feedback ! I think you're right about the HTC 
custom
camera app (seems to come with HTC Sense interface) which didn't respect the
OUTPUT_EXTRA.

It seems to be a known issue, as seen here:
http://code.google.com/p/android/issues/detail?id=1480#c16

One solution would be to re-implement a small camera application into 
osmtracker, but
I'm not really motivated for that, "just" to fix some HTC bugs.

Another solution is, as you said, to play with the returned Intent of camera 
app to
analyze if any extra data passed can be used to locate the file, and set the
appropriate URI in the <link> tag.

As you seem to know a bit about development too, are you able to do that or do 
you
want me to code a small application to perform these tests ?

Original comment by nguillau...@gmail.com on 27 Mar 2010 at 3:29

GoogleCodeExporter commented 9 years ago
A related note: The "Take photo" function is crashing the app on my HTC Legend 
running 
Android 2.1
But the images are in fact stored in :\DCIM\100MEDIA
as mentioned above.

Original comment by jesperfj...@gmail.com on 6 Apr 2010 at 5:12

GoogleCodeExporter commented 9 years ago
On my Samsung Galaxy Tab the images are stored both in the camera directory and 
in the track directory. Not a huge problem, but I suppose it would have been 
best to only save them in the track directory. As for file names they're 
compatible with JOSM, but for some reason not with viking.

Android 2.2
Galaxy Tab GT-P1000
Firmware P1000XXJMA
Kernel 2.6.32.9

Original comment by dittaeva on 9 May 2011 at 3:49