Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CAC5BD930 for ; Wed, 3 Oct 2012 21:32:51 +0000 (UTC) Received: (qmail 72261 invoked by uid 500); 3 Oct 2012 21:32:51 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 72242 invoked by uid 500); 3 Oct 2012 21:32:51 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 72232 invoked by uid 99); 3 Oct 2012 21:32:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 21:32:51 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bowserj@gmail.com designates 74.125.82.175 as permitted sender) Received: from [74.125.82.175] (HELO mail-we0-f175.google.com) (74.125.82.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 21:32:45 +0000 Received: by weyt44 with SMTP id t44so4596515wey.6 for ; Wed, 03 Oct 2012 14:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5Cg7gBKwXW9+YpDDCDZt1od8et10aPjHVgy295O3cHw=; b=Ry/vNHRcN07sigk6N230cfPaaX9icNsp3koCgaZh12UAC/fLtBuFsJ4NSGvH7de99t IfvzUDPGRxCK3Zx0J66qOfMGcNr5ex4mLe9N/mqqQ6zYW+AZ+a1VCq6DZuVMsAPkQ74t qi8UZ98orecGkLMeh7VmHF9j3s4ur0pSxMm8SedvhSewxelLFEFbE89lS8zldVyGNSB7 5CoCjrvPunN8mFBDf7AcbnCit02YKLjIBnPM3Au9oB98SLrZJrOE90CJHf+1/pR/aVlR Fbq4RfkhWSBX/QMFNdl+16uBoSQMXYw2qCE/EgyderZUqeO+jWx/HdD0EjRaEzU7uGP1 9oTQ== MIME-Version: 1.0 Received: by 10.180.91.169 with SMTP id cf9mr33057952wib.1.1349299944940; Wed, 03 Oct 2012 14:32:24 -0700 (PDT) Received: by 10.223.83.15 with HTTP; Wed, 3 Oct 2012 14:32:24 -0700 (PDT) In-Reply-To: References: Date: Wed, 3 Oct 2012 14:32:24 -0700 Message-ID: Subject: Re: [Android] Preview and one activity too far? From: Joe Bowser To: callback-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > On Wed, Oct 3, 2012 at 1:05 PM, Simon MacDonald > 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