payload: {"action":"created","issue":{"url":"https://api.github.com/repos/dsgriffin/cordova-vuforia-example/issues/12","repository_url":"https://api.github.com/repos/dsgriffin/cordova-vuforia-example","labels_url":"https://api.github.com/repos/dsgriffin/cordova-vuforia-example/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/dsgriffin/cordova-vuforia-example/issues/12/comments","events_url":"https://api.github.com/repos/dsgriffin/cordova-vuforia-example/issues/12/events","html_url":"https://github.com/dsgriffin/cordova-vuforia-example/issues/12","id":357897626,"node_id":"MDU6SXNzdWUzNTc4OTc2MjY=","number":12,"title":"Camera takes too long time to open","user":{"login":"danyarzeta","id":11356076,"node_id":"MDQ6VXNlcjExMzU2MDc2","avatar_url":"https://avatars0.githubusercontent.com/u/11356076?v=4","gravatar_id":"","url":"https://api.github.com/users/danyarzeta","html_url":"https://github.com/danyarzeta","followers_url":"https://api.github.com/users/danyarzeta/followers","following_url":"https://api.github.com/users/danyarzeta/following{/other_user}","gists_url":"https://api.github.com/users/danyarzeta/gists{/gist_id}","starred_url":"https://api.github.com/users/danyarzeta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danyarzeta/subscriptions","organizations_url":"https://api.github.com/users/danyarzeta/orgs","repos_url":"https://api.github.com/users/danyarzeta/repos","events_url":"https://api.github.com/users/danyarzeta/events{/privacy}","received_events_url":"https://api.github.com/users/danyarzeta/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-09-07T02:36:45Z","updated_at":"2019-03-27T17:21:41Z","closed_at":"2018-09-18T03:10:34Z","author_association":"NONE","body":"I developed an ionic app to recognized images with this vuforia plugin. All the content of the app is made with ionic v1 except the vuforia part, i am using the index.js code of yours. I already install platforms ios and android and with ios is everything ok, but i have such a great problem with android platform, when i try to open vuforia camera in an android device takes about 5 minutes to initialized the camera and i have no clue why? I already try with different android platforms and the 5.2 version is the one that suite better. I already try with different cordova versions and the 7 version was the better option, the cordova 8.0 version and android platform 7.0 where having lots of problems with vuforia plugin and the installation was unsuccesful.\r\n\r\nPlugins:\r\ncordova-plugin-camera 2.3.0 \"Camera\"\r\ncordova-plugin-compat 1.2.0 \"Compat\"\r\ncordova-plugin-device 1.1.3 \"Device\"\r\ncordova-plugin-geolocation 2.4.3 \"Geolocation\"\r\ncordova-plugin-inappbrowser 3.0.0 \"InAppBrowser\"\r\ncordova-plugin-splashscreen 4.0.3 \"Splashscreen\"\r\ncordova-plugin-vuforia 3.2.1 \"Vuforia\"\r\ncordova-plugin-vuforia-sdk 6.0.117 \"Vuforia SDK\"\r\ncordova-plugin-whitelist 1.3.0 \"Whitelist\r\n\r\nInstalled platforms:\r\n  android 5.2.2\r\n\r\n npm 5.6.0\r\n  ionic CLI 4.1.1\r\n cordova 7.0.1\r\n\r\nThis is my code:\r\nINDEX.HTML:\r\n\r\n<!DOCTYPE html>\r\n<html>\r\n<head>\r\n    <meta charset=\"utf-8\">\r\n    <meta name=\"viewport\" content=\"viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\"/>\r\n    <meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *\">\r\n    <meta name=\"format-detection\" content=\"telephone=no\">\r\n    <meta name=\"msapplication-tap-highlight\" content=\"no\">\r\n    <title></title>\r\n    <link href=\"lib/ionic/css/ionic.css\" rel=\"stylesheet\">   \r\n    <link href=\"css/style.css\" rel=\"stylesheet\">    \r\n    <script src=\"https://maps.google.com/maps/api/js?key=&libraries=places\"></script>\r\n    <script src=\"lib/ionic/js/ionic.bundle.js\"></script>\r\n    <script src=\"lib/underscore/underscore-min.js\"></script>\r\n    <script src=\"lib/moment/moment.js\"></script>\r\n    <script src=\"lib/angular-moment/angular-moment.js\"></script>\r\n    <script src=\"lib/ngmap/build/scripts/ng-map.min.js\"></script>\r\n    <script src=\"lib/ngCordova/dist/ng-cordova.min.js\"></script>\r\n\r\n    <!-- cordova script (this will be a 404 during development) -->\r\n    <script src=\"cordova.js\"></script>\r\n\r\n    <!-- your app's js -->\r\n    <script src=\"js/index.js\"></script>    \r\n    <script src=\"js/app.js\"></script>\r\n    <script src=\"js/controllers.js\"></script>\r\n    <script src=\"js/services.js\"></script>\r\n    <script src=\"js/factory.js\"></script>\r\n    <script src=\"js/config.js\"></script>\r\n    <script src=\"js/directives.js\"></script>\r\n    <script src=\"js/jlinq.js\"></script>    \r\n    <script src=\"js/lista.js \"></script>\r\n   \r\n</head>\r\n\r\n<body ng-app=\"saludmich\" class=\"platform-ios platform-cordova platform-webview\">\r\n    <ion-nav-view></ion-nav-view>\r\n</body>\r\n\r\n</html>\r\n\r\nTHIS HTML CODE STARTS VUFORIA:\r\n<ion-view>\r\n<ion-nav-bar>\r\n<ion-nav-buttons side=\"left\">\r\n<button menu-toggle=\"left\" class=\"button button-icon icon ion-navicon\"></button>\r\n</ion-nav-buttons>\r\n<ion-nav-title>            \r\n<img src=\"principal/top.jpg\" width=\"100%\">            \r\n</ion-nav-title>\r\n</ion-nav-bar>\r\n<ion-content>        \r\n<center>\r\n<div style=\"position:relative;top:100px\">\r\n<table width=\"60%\">\r\n<tr>\r\n<td width=\"50%\" bgcolor=\"#ffffff\">\r\n                    <a id=\"start-vuforia\">\r\n                        <img  src=\"botones/boton-lector.jpg\" width=\"100%\" alt=\"\" />\r\n                    </a>\r\n                </td>\r\n            </tr>\r\n        </div>\r\n        </table>\r\n        </center>\r\n    </ion-content>\r\n    <div class=\"bar bar-footer\">\r\n        <div class=\"title\"><img src=\"principal/footer.jpg\" width=\"100%\"></div>\r\n    </div>\r\n</ion-view>\r\n\r\nAND THIS IS THE INDEX.JS\r\n\r\n/*\r\n * Licensed to the Apache Software Foundation (ASF) under one\r\n * or more contributor license agreements.  See the NOTICE file\r\n * distributed with this work for additional information\r\n * regarding copyright ownership.  The ASF licenses this file\r\n * to you under the Apache License, Version 2.0 (the\r\n * \"License\"); you may not use this file except in compliance\r\n * with the License.  You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing,\r\n * software distributed under the License is distributed on an\r\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n * KIND, either express or implied.  See the License for the\r\n * specific language governing permissions and limitations\r\n * under the License.\r\n */\r\nvar app = {\r\n    // Vuforia license\r\n    vuforiaLicense: 'MY_ID',\r\n    \r\n    // Are we launching Vuforia with simple options?\r\n    simpleOptions: null,\r\n    // Which images have we matched?\r\n    matchedImages: [],\r\n    // Application Constructor\r\n    initialize: function() {\r\n        this.bindEvents();\r\n    },\r\n    // Bind Event Listeners\r\n    //\r\n    // Bind any events that are required on startup. Common events are:\r\n    // 'load', 'deviceready', 'offline', and 'online'.\r\n    bindEvents: function() {\r\n        document.addEventListener('deviceready', this.onDeviceReady, false);\r\n    },\r\n    // deviceready Event Handler\r\n    //\r\n    // The scope of 'this' is the event. In order to call the 'receivedEvent'\r\n    // function, we must explicitly call 'app.receivedEvent(...);'\r\n    onDeviceReady: function() {\r\n        app.receivedEvent('deviceready');\r\n    },\r\n    // Update DOM on a Received Event\r\n    receivedEvent: function(id) {\r\n        // Start Vuforia using simple options\r\n        document.getElementById('start-vuforia').onclick = function() {\r\n            app.startVuforia(false);\r\n            // Wait for a timeout, then automatically stop Vuforia\r\n            //setTimeout(function(){\r\n            //    app.stopVuforia();\r\n            //}, 20000);\r\n        };\r\n    },\r\n    // Start the Vuforia plugin\r\n    startVuforia: function(simpleOptions, successCallback, overlayMessage, targets) {\r\n        var options;\r\n\r\n        if (typeof overlayMessage == 'undefined')\r\n            overlayMessage = '\\nApunta tu c\\u00e1mara a la etiqueta del producto. Nota, no lee c\\u00f3digos de barra y QR.';\r\n\r\n        if (typeof targets == 'undefined')\r\n            targets = [\r\n                'ades',\r\n                'ganimalitos1',\r\n                'ganimalitos2',\r\n                'milk_magic_popotes'\r\n            ];\r\n        // Reset the matched images\r\n        app.matchedImages = [];\r\n\r\n        // Set the global simpleOptions flag\r\n        app.simpleOptions = simpleOptions;\r\n\r\n\r\n        // Log out wether or not we are using simpleOptions\r\n        console.log('Simple options: ' + !!app.simpleOptions);\r\n\r\n        // Load either simple, or full options\r\n        if (!!app.simpleOptions) {\r\n            options = {\r\n                databaseXmlFile: 'www/targets/SemaforoSalud.xml',\r\n                targetList: targets,\r\n                overlayMessage: overlayMessage,\r\n                vuforiaLicense: app.vuforiaLicense\r\n            };\r\n        } else {\r\n            options = {\r\n                databaseXmlFile: 'www/targets/SemaforoSalud.xml',\r\n                targetList: targets,\r\n                vuforiaLicense: app.vuforiaLicense,\r\n                overlayMessage: overlayMessage,\r\n                showDevicesIcon: true,\r\n                showAndroidCloseButton: true,\r\n                autostopOnImageFound: true\r\n            };\r\n        }\r\n\r\n        // Start Vuforia with our options\r\n        navigator.VuforiaPlugin.startVuforia(\r\n            options,\r\n            successCallback || app.vuforiaMatch,\r\n            function(data) {\r\n                alert(\"Error: \" + data);\r\n            }\r\n        );\r\n    },\r\n    vuforiaMatch: function(data) {\r\n        // To see exactly what `data` can contain, see 'Success callback `data` API' within the plugin's documentation.\r\n        console.log(data);\r\n        \r\n        // Have we found an image?\r\n        if (data.status.imageFound) {\r\n            //app.playSound();\r\n            document.location.href = \"../www/views/producto.html?target=\" + data.result.imageName;\r\n\r\n            //var css = \" style='display: table-cell;vertical-align: middle; text-align: center; width: 50%;'\";\r\n            //data.status.message;\r\n            //document.getElementById('tabla').innerHTML = \"Producto encontrado\";\r\n            //console.log(\"Image name: \"+ data.result.imageName); \r\n        }\r\n    },\r\n    // Stop the Vuforia plugin\r\n    stopVuforia: function() {\r\n        navigator.VuforiaPlugin.stopVuforia(function(data) {\r\n            console.log(data);\r\n\r\n            if (data.success == 'true') {\r\n                alert('Ya tomaste demasiado tiempo para localizar una imagen.');\r\n            } else {\r\n                alert('No se puede detener!' + data.message);\r\n            }\r\n        }, function(data) {\r\n            console.log(\"Error al detener:\\n\" + data);\r\n        });\r\n    },\r\n    // Play a bell sound\r\n    playSound: function(resumeTrackers) {\r\n        // Where are we playing the sound from?\r\n        var soundURL = app.getMediaURL(\"sounds/sound.wav\");\r\n\r\n        // Setup the media object\r\n        var media = new Media(soundURL, function() {\r\n            console.log('Sound Played');\r\n\r\n            navigator.VuforiaPlugin.startVuforiaTrackers(\r\n                function() {\r\n                    console.log('Empezando nuevamente la realidad aumentada');\r\n                },\r\n                function() {\r\n                    console.log('No se pudo iniciar');\r\n                }\r\n            );\r\n        }, app.mediaError);\r\n        // Play the sound\r\n        media.play();\r\n\r\n    },\r\n    // Get the correct media URL for both Android and iOS\r\n    getMediaURL: function(s) {\r\n        if (device.platform.toLowerCase() === \"android\") return \"/android_asset/www/\" + s;\r\n        return s;\r\n    },\r\n    // Handle a media error\r\n    mediaError: function(e) {\r\n        alert('Media Error');\r\n        alert(JSON.stringify(e));\r\n    }\r\n};\r\n\r\napp.initialize();\r\n"},"comment":{"url":"https://api.github.com/repos/dsgriffin/cordova-vuforia-example/issues/comments/477264799","html_url":"https://github.com/dsgriffin/cordova-vuforia-example/issues/12#issuecomment-477264799","issue_url":"https://api.github.com/repos/dsgriffin/cordova-vuforia-example/issues/12","id":477264799,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3NzI2NDc5OQ==","user":{"login":"danyarzeta","id":11356076,"node_id":"MDQ6VXNlcjExMzU2MDc2","avatar_url":"https://avatars0.githubusercontent.com/u/11356076?v=4","gravatar_id":"","url":"https://api.github.com/users/danyarzeta","html_url":"https://github.com/danyarzeta","followers_url":"https://api.github.com/users/danyarzeta/followers","following_url":"https://api.github.com/users/danyarzeta/following{/other_user}","gists_url":"https://api.github.com/users/danyarzeta/gists{/gist_id}","starred_url":"https://api.github.com/users/danyarzeta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danyarzeta/subscriptions","organizations_url":"https://api.github.com/users/danyarzeta/orgs","repos_url":"https://api.github.com/users/danyarzeta/repos","events_url":"https://api.github.com/users/danyarzeta/events{/privacy}","received_events_url":"https://api.github.com/users/danyarzeta/received_events","type":"User","site_admin":false},"created_at":"2019-03-27T17:21:41Z","updated_at":"2019-03-27T17:21:41Z","author_association":"NONE","body":"What framework are you using to develop?\n\nDescarga Outlook para iOS<https://aka.ms/o0ukef>\n\n________________________________\nDe: Caratroc <notifications@github.com>\nEnviado: miércoles, marzo 27, 2019 9:34 a. m.\nPara: dsgriffin/cordova-vuforia-example\nCC: danyarzeta; State change\nAsunto: Re: [dsgriffin/cordova-vuforia-example] Camera takes too long time to open (#12)\n\n\nHi,\nWe are currently having the same issue, how did you manage to fix this ?\nThanks\n\n—\nYou are receiving this because you modified the open/close state.\nReply to this email directly, view it on GitHub<https://github.com/dsgriffin/cordova-vuforia-example/issues/12#issuecomment-477212503>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AK1HrO1NJPa5VS9Wlph6N4pNH1CyaCD0ks5va499gaJpZM4WeFIV>.\n"}}
other: {"actor":{"display_login":"danyarzeta"}}