incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bowser <bows...@gmail.com>
Subject Re: [Android] Preview and one activity too far?
Date Wed, 03 Oct 2012 21:32:24 GMT
Hey

I added the code for the Preview.  There's still issues with the
preview looking distorted, and I'm still tweaking it, but we're close
to getting the features matching up with the pre-existing camera.  I
was able to dodge the bullet of creating a 2nd activity by hiding and
showing Android UI elements in Java.  It's something that I remembered
done in the ADK example that Google provided, so I think that's an
acceptable fix.

The code is still here: https://github.com/infil00p/callback-android/tree/camera

I'm going to hold off on coding the layouts so that people don't have
to copy over XML for now, however that's something that I definitely
want to do, since we don't have a solid way of dealing with external
layouts, or at least one that I understand that can avoid collisions.
(i.e. If org.apache.cordova.R has an resource with an ID of 7 and
com.myapp.R has a resource with an ID of 7, which resource wins?)

Joe

On Wed, Oct 3, 2012 at 1:21 PM, Joe Bowser <bowserj@gmail.com> wrote:
> On Wed, Oct 3, 2012 at 1:05 PM, Simon MacDonald
> <simon.macdonald@gmail.com> wrote:
>> I kinda think we need a preview. Here is some new plugins that have
>> just been submitted that do what we are looking to do:
>>
>> https://github.com/phonegap/phonegap-plugins/tree/master/Android/ForegroundCamera
>> https://github.com/phonegap/phonegap-plugins/tree/master/Android/ForegroundGallery
>>
>
> These plugins are REALLY barebones, and look very similar to the
> Camera code that you wrote earlier.  There's no Auto Focus or Zoom on
> these cameras, both of which are currently working on my branch.
>
> https://github.com/infil00p/callback-android/tree/camera
>
> And here's a screenshot from an HTC One X showing that we need assets:
>
> http://www.flickr.com/photos/52655207@N00/8051510525/in/photostream
>
>> One of my other thoughts about this endeavour is that it is a lot more
>> work than we first thought. I don't see this making 2.2.0 as we'll
>> need to test the hell out of it before replacing the current camera.
>>
>
> Agreed. Hacking together a simple camera definitely has some feature
> creep.  There's also the fact that we have to test it across a wide
> range of devices, which we've been doing here, but this is basically
> regular Native Android development at this point.  That being said,
> I'm working on putting Preview in the same activity as the Camera
> because I don't think it needs a 2nd activity, and I don't like the
> extra intent passing after hacking on it earlier.  I'm hoping to get
> the preview working.  After that, we're going to have to deal with
> other state issues, namely what happens when the phone goes to sleep.
>
> Then there's the whole transcribing of the layouts to code so that we
> don't have to get users to pass around another XML layout or do things
> like have scripts add Java includes. (I think our scripts write enough
> Java code already)
>
> Joe

Mime
View raw message