Closed GoogleCodeExporter closed 9 years ago
This is very odd. I will bring out some older devices to try to repro. This
works fine on my nexus s. I think that the service should throw an exception
in this state. It seems like the widget has the wrong pending intent set but I
don't know how that would happen. Did the arrow change color for you?
Original comment by sandordo...@google.com
on 28 Jul 2011 at 3:49
I was also able to reproduce this but had to double tab on the widget to do so.
When I reproduced this issue the arrow does not change colors but the arrow
icon gets added the status bar but disappears after pressing "Force Close" on
the error. Any more taps I do on the widget and I get the error again. I have
to open MyTracks and press stop for the widget to work again.
Also anther path I found to reproduce the issue but a very unlikely use case is:
1. Start recording from MyTracks itself.
2. Added widget to home screen. (After adding the arrow is orange instead of
red)
3. Press on the arrow on the added widget.
I have added my log as an attachment.
I'll see if I can fix this issue. If anyone as started a fix or has any
pointers of where a catch should be done for this thrown exception it would be
helpful.
Thanks.
Original comment by jKas...@gmail.com
on 23 Sep 2011 at 5:27
Attachments:
So it seems like two intents get fired. The first goes through but the second
must fail. The precondition it is failing seems pretty reasonable to me. IE a
normal start track should fail if one is already going. Perhaps we could
introduce an extra on the start track intent which made the operation
idempotent. Maybe failOnActive track. If the value is present and false then
the service would silently trap the exceptions.
Original comment by sandordo...@google.com
on 26 Sep 2011 at 4:14
Thanks for your help. Saw the multiple intent getting sent but was hoping there
was a way to catch the exception within the widget. Sent an extra with the
intent like you suggested.
https://code.google.com/r/jkasten-mytracks2/source/detail?r=eecee1d5ee78181dde64
624f05a79d814d1c8e55
Thanks.
Original comment by jKas...@gmail.com
on 28 Sep 2011 at 1:08
The final revision LGTM.
Jimmy you want to pull this in?
Original comment by sandordo...@google.com
on 28 Sep 2011 at 3:59
Original comment by jshih@google.com
on 29 Sep 2011 at 2:53
Original issue reported on code.google.com by
rdama...@google.com
on 14 Jul 2011 at 12:18