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 F1A67D3EA for ; Wed, 11 Jul 2012 21:33:34 +0000 (UTC) Received: (qmail 9551 invoked by uid 500); 11 Jul 2012 21:33:34 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 9523 invoked by uid 500); 11 Jul 2012 21:33:34 -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 9513 invoked by uid 99); 11 Jul 2012 21:33:34 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 21:33:34 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 9914A14052D for ; Wed, 11 Jul 2012 21:33:34 +0000 (UTC) Date: Wed, 11 Jul 2012 21:33:33 +0000 (UTC) From: "Filip Maj (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <714000236.38187.1342042414629.JavaMail.jiratomcat@issues-vm> In-Reply-To: <954948061.14738.1341591035521.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (CB-1013) Refactor all platform's device plugin into a common device plugin MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412024#comment-13412024 ] Filip Maj commented on CB-1013: ------------------------------- The refactor of the JS is in a branch on Apache here: https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=shortlog;h=refs/heads/device > Refactor all platform's device plugin into a common device plugin > ----------------------------------------------------------------- > > Key: CB-1013 > URL: https://issues.apache.org/jira/browse/CB-1013 > Project: Apache Cordova > Issue Type: Improvement > Components: CordovaJS > Affects Versions: 1.9.0 > Reporter: Filip Maj > Assignee: Filip Maj > Fix For: 2.0.0 > > > Almost all of the implementations' device plugin does the same thing: > 1. On construction, attach to the CordovaReady internal event > 2. Inside this event, fire off {{exec}} to a "device" service requesting the "getDeviceInfo" action > 3. When that info becomes available, assign the device information to the device plugin properties and fire off the {{CordovaInfoReady}} event. > The one black sheep in this approach is iOS. iOS instead has the native framework directly call the device plugin's {{setInfo}} method (essentially circumventing {{exec}}). This is a problem for emulation layers such as Ripple, where {{exec}} is the abstraction/hook that needs to be utilized. > May need to implement a few platform-specific merge plugins for device, but the core pattern exists in the common one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira