[GitHub] cordova-plugin-camera pull request: Retaining image ratio when res...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/118#issuecomment-136498895 I think the logic needs some rework. Imagine original picture with size 2w x 1h (aspect ratio 2). If we want to scale this image to 10x5 this CR will provide us with 5x2.5 which is not the most optimum outcome. Ideally the outcome should be: original width x height | aspect ratio --- | --- 2x1 | 2 target width x height | target aspect ratio | output width x height | output aspect ratio --- | --- | --- | --- 10x5 | 2 | 10x5 | 2 12x5 | 2,4 | 10x5 | 2 8x5 | 1,6 | 8x4 | 2 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Retaining image ratio when res...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/118#issuecomment-136510649 Yup, looks like right. Thanks! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-registry-web pull request: Small performance updates and o...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-registry-web/pull/31#issuecomment-132805181 these changes look good to me :+1: --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9499: There is a run failure when...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/116#discussion_r37230334 --- Diff: template/cordova/lib/package.js --- @@ -215,13 +215,20 @@ module.exports.deployToDesktop = function (package, deployTarget) { return utils.getAppStoreUtils().then(function(appStoreUtils) { return getPackageName(path.join(__dirname, '..', '..')).then(function(pkgname) { + +var oldArch; // uninstalls previous application instance (if exists) console.log('Attempt to uninstall previous application version...'); return spawn('powershell', ['-ExecutionPolicy', 'RemoteSigned', 'Import-Module ' + appStoreUtils + '; Uninstall-App ' + pkgname]) .then(function() { console.log('Attempt to install application...'); +oldArch = process.env.PROCESSOR_ARCHITECTURE; +if (package.arch === 'x64') { +process.env.PROCESSOR_ARCHITECTURE = 'AMD64'; +} return spawn('powershell', ['-ExecutionPolicy', 'RemoteSigned', 'Import-Module ' + appStoreUtils + '; Install-App', utils.quote(package.script)]); --- End diff -- If we throw here the PROCESSOR_ARCHITECTURE will remain changed. While this currently has no side effects, we probably want to have a catch promise and set the PROCESSOR_ARCHITECTURE to the original value since it's a shared value. LGTM otherwise. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8054 Support taking picture...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/86#issuecomment-128766483 Hmm, can you share your camera settings with me? I've tried the following with ee5cfe89 (master): ``` destinationType: Camera.DestinationType.FILE_URI, encodingType: Camera.EncodingType.JPEG, sourceType : Camera.PictureSourceType.PHOTOLIBRARY ``` ``` destinationType: Camera.DestinationType.FILE_URI, encodingType: Camera.EncodingType.JPEG, sourceType : Camera.PictureSourceType.CAMERA, saveToPhotoAlbum: true ``` both of them working fine for me (win-phone 8.1). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9458: Updated the baseline versio...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-windows/pull/110#issuecomment-128095909 :shipit: --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-lib pull request:
Github user muratsu commented on the pull request: https://github.com/apache/cordova-lib/commit/52ef1c586d3e3b2bb4b7447408a01c00c668cc74#commitcomment-12523023 In cordova-lib/spec-cordova/save.spec.js: In cordova-lib/spec-cordova/save.spec.js on line 491: yeah looks like in newer jasmine versions you have fail(msg) method. which will do what I want here. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-lib pull request:
Github user muratsu commented on the pull request: https://github.com/apache/cordova-lib/commit/52ef1c586d3e3b2bb4b7447408a01c00c668cc74#commitcomment-12506160 In cordova-lib/spec-cordova/save.spec.js: In cordova-lib/spec-cordova/save.spec.js on line 491: `except(err.message).toBe(null);` more concise? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-9443 Pick correct maxResolu...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/111#issuecomment-127409849 Sorry didn't see your comment earlier. In terms of perf, I think this the usage of `if/else` vs `switch` is not really important here. Since we're only executing it once, the perf difference is not going to be noticable either case. Readability is a bit more subjective - I don't have a preference in this case. I tend to use switches only when I have fall-through cases. I wasn't familiar with `switch(true)` pattern. It seemed like an anti-pattern to me at first but looks like it is a common pattern in dynamic languages. I'll revert it back to switch. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-9151 Trigger captureAction ...
Github user muratsu closed the pull request at: https://github.com/apache/cordova-plugin-camera/pull/110 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-9443 Pick correct maxResolu...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/111 CB-9443 Pick correct maxResolution According to MSDN docs we're currently not picking the correct maxResolution for images: https://msdn.microsoft.com/en-us/library/windows/apps/windows.media.capture.cameracaptureuimaxphotoresolution.aspx You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-9443 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/111.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #111 commit f60324e71bc0a894d91d83387533b2c274c1b908 Author: Murat Sutunc sut...@gmail.com Date: 2015-08-03T19:57:58Z CB-9443 Pick correct maxResolution --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-9443 Pick correct maxResolu...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/111#discussion_r36130273 --- Diff: src/windows/CameraProxy.js --- @@ -696,21 +696,22 @@ function takePictureFromCameraWindows(successCallback, errorCallback, args) { // decide which max pixels should be supported by targetWidth or targetHeight. var maxRes = null; var UIMaxRes = WMCapture.CameraCaptureUIMaxPhotoResolution; +var totalPixels = targetWidth * targetHeight; switch (true) { --- End diff -- didn't notice `switch (true)` was just correcting the case params but wow - haha. definetely turning this to a `if/else` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-9151 Trigger captureAction ...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/110#issuecomment-126443320 I think the logic has to stay in onClick event for easy cleanup purposes. I've made the event handlers seperate functions. It's much cleaner now. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-9413 Close RandomAccessStre...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/109 CB-9413 Close RandomAccessStream once copied RandomAccessStream.copyAsync does not close destination stream, which is casuing a WinRT exception. Use copyAndCloseAsync instead. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-9413 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/109.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #109 commit 110b3b33886ba2fff9827f69a08660d660a22e77 Author: Murat Sutunc sut...@gmail.com Date: 2015-07-27T18:39:38Z CB-9413 Close RandomAccessStream once copied --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-9151 Trigger captureAction ...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/110 CB-9151 Trigger captureAction only once Prevent multiple captureAction calls by using `clicked` attribute You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-9151 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/110.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #110 commit ad31103226aca5240840ba9cc17d0c6d82eac417 Author: Murat Sutunc sut...@gmail.com Date: 2015-07-27T19:15:25Z CB-9151 Trigger captureAction only once --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-registry-web pull request: Fix all known css issues
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-registry-web/pull/30 Fix all known css issues This fixes all known CSS issues. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-registry-web dev Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-registry-web/pull/30.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #30 commit 38bad0e02445e2c4a8e5e3b13c58c1ca943b2506 Author: Murat Sutunc sut...@gmail.com Date: 2015-07-24T07:04:40Z fix all css issues --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9359: Adds support for .appxbundl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/102#discussion_r35133311 --- Diff: template/cordova/lib/build.js --- @@ -229,11 +268,66 @@ function buildTargets(msbuild, config) { if (msbuild.version == '4.0' build.target == projFiles.win80) { build.target = 'CordovaApp.vs2012.sln'; } -return msbuild.buildProject(path.join(ROOT, build.target), config.buildType, build.arch); + +var otherProperties = { }; +// Only add the CordovaBundlePlatforms argument when on the last build step +if (shouldBundle index === configsArray.length - 1) { +otherProperties.CordovaBundlePlatforms = bundleTerms; +} else if (shouldBundle) { +otherProperties.CordovaBundlePlatforms = build.arch; +} +return msbuild.buildProject(path.join(ROOT, build.target), config.buildType, build.arch, otherProperties); }); }, Q()); + +if (shouldBundle) { +return buildsCompleted.then(function() { +// msbuild isn't capable of generating bundles unless you enable bundling for each individual arch +// However, that generates intermediate bundles, like CordovaApp.Windows10_0.0.1.0_x64.appxbundle +// We need to clear the intermediate bundles, or else cordova run will fail because of too +// many .appxbundle files. + +console.log('Clearing intermediates...'); +var appPackagesPath = path.join(ROOT, 'AppPackages'); +var childDirectories = shell.ls(path.join(appPackagesPath, '*')).map(function(pathName) { +return { path: pathName, stats: fs.statSync(pathName) }; +}).filter(function(fileInfo) { +return fileInfo.stats.isDirectory(); +}); + +if (childDirectories.length === 0) { +throw new Error('Could not find a completed app package directory.'); --- End diff -- should we Q.reject instead? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9359: Adds support for .appxbundl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/102#discussion_r35133583 --- Diff: template/cordova/lib/build.js --- @@ -229,11 +268,66 @@ function buildTargets(msbuild, config) { if (msbuild.version == '4.0' build.target == projFiles.win80) { build.target = 'CordovaApp.vs2012.sln'; } -return msbuild.buildProject(path.join(ROOT, build.target), config.buildType, build.arch); + +var otherProperties = { }; +// Only add the CordovaBundlePlatforms argument when on the last build step +if (shouldBundle index === configsArray.length - 1) { +otherProperties.CordovaBundlePlatforms = bundleTerms; +} else if (shouldBundle) { +otherProperties.CordovaBundlePlatforms = build.arch; +} +return msbuild.buildProject(path.join(ROOT, build.target), config.buildType, build.arch, otherProperties); }); }, Q()); + +if (shouldBundle) { +return buildsCompleted.then(function() { +// msbuild isn't capable of generating bundles unless you enable bundling for each individual arch +// However, that generates intermediate bundles, like CordovaApp.Windows10_0.0.1.0_x64.appxbundle +// We need to clear the intermediate bundles, or else cordova run will fail because of too +// many .appxbundle files. + +console.log('Clearing intermediates...'); +var appPackagesPath = path.join(ROOT, 'AppPackages'); +var childDirectories = shell.ls(path.join(appPackagesPath, '*')).map(function(pathName) { +return { path: pathName, stats: fs.statSync(pathName) }; +}).filter(function(fileInfo) { +return fileInfo.stats.isDirectory(); +}); + +if (childDirectories.length === 0) { +throw new Error('Could not find a completed app package directory.'); +} + +// find the most-recently-modified directory +childDirectories.sort(function(a, b) { return b.stats.mtime - a.stats.mtime; }); +var outputDirectory = childDirectories[0]; + +var finalFile = ''; + +var archSearchString = bundleTerms.replace(/\|/g, '_') + (config.buildType === 'debug' ? '_debug' : '') + '.appxbundle'; +var filesToDelete = shell.ls(path.join(outputDirectory.path, '*.appx*')).filter(function(appxbundle) { +var isMatch = appxbundle.indexOf(archSearchString) === -1; +if (!isMatch) { +finalFile = appxbundle; +} +return isMatch; +}); +filesToDelete.forEach(function(file) { +shell.rm(file); --- End diff -- should we fail fast if we have trouble deleting a file? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9359: Adds support for .appxbundl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/102#discussion_r35132724 --- Diff: template/cordova/lib/build.js --- @@ -134,6 +141,12 @@ function parseAndValidateArgs(argv) { config.phone = args.phone ? true : false; config.win = args.win ? true : false; config.projVerOverride = args.appx; +// only set config.bundle if 1 architecture none of which is any cpu +if (config.buildArchs.length 1 config.buildArchs.indexOf('anycpu') === -1 config.buildArchs.indexOf('any cpu') === -1) { --- End diff -- `config.buildArchs.length 1` :+1: --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9359: Adds support for .appxbundl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/102#discussion_r35134586 --- Diff: template/cordova/lib/run.js --- @@ -104,12 +104,16 @@ module.exports.run = function (argv) { projectType = 'windows80'; } +if (projectType === 'windows80') { +// Don't enable bundling for Windows 8. +argv.push('--no-bundle'); --- End diff -- argv might already contain --no-bundle. this potentially adds an extra argument --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-registry-web pull request: Modularize code and faster sear...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-registry-web/pull/29 Modularize code and faster search experience Refactored the codebase to be more modular, which fits with the reactjs class/components concept. Also rewrote `searchbar.jsx` component to have a better search experience. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-registry-web dev Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-registry-web/pull/29.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #29 commit 6a02d7bfc8b733ebb3bbcbaf48cac8ca9fe81390 Author: Murat Sutunc sut...@gmail.com Date: 2015-07-17T07:00:05Z modularize commit e8e1b403f17a9ffa4cfe73ac8587172b5d9ac996 Author: Murat Sutunc sut...@gmail.com Date: 2015-07-18T01:07:52Z faster search! commit 5ba8e537a3559210a3dd84edcacf8502b29957ac Author: Murat Sutunc sut...@gmail.com Date: 2015-07-20T17:37:59Z refactor modules --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-registry-web pull request: Use gulp-serve instead of brows...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-registry-web/pull/27 Use gulp-serve instead of browser-sync Two problems I've encountered: - On Windows, browser-sync depends on VS and python 2.x. - On Windows, 2 of my machines ran into 256 char path limit issue while compiling browser-sync dependencies You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-registry-web gulp-serve Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-registry-web/pull/27.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #27 commit aefa1cc71c125cb12d8938cfd532a60593b1f21f Author: Murat Sutunc sut...@gmail.com Date: 2015-07-17T06:04:03Z Use gulp-serve instead of browser-sync --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Correct image resolution selec...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/56#issuecomment-121375282 @kiwinewt thanks for the contribution. The right approach here is to take into account the max num of pixels instead of a certain height or width limit. VeryLarge5M = 5 * 1000 * 1000; Large3M = 3 * 1000 * 1000; MediumXga = 1024 * 768; SmallVga = 640 * 480; VerySmallQvga = 320 * 240; If you can modify the code as such, I'll be glad to accept your PR - thanks! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-device-motion pull request: CB-9339 Increase the de...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-plugin-device-motion/pull/32 CB-9339 Increase the default sensor accuracy The current default SENSOR_STATUS_UNRELIABLE is having problems on sensors which fail to report accuracy. One such example is Nexus 7 (2013). On Android 5.1.1 (api 22) onAccuracyChanged() method is not getting fired for sensor accuracy. As a result the default accuracy is unchanged (SENSOR_STATUS_UNRELIABLE). Since we don't report sensor data if accuracy is lower than medium, we don't report on this hw/sw combination. Stangely same code on same hw, works on earlier OS (Android 4.3 (api 18)). It seems like there's a regression on OS sensor drivers but that's outside of our scope. With this change we will now report values for sensors which fail to report any accuracy but some sensor data. In case a sensor fails to report any accuracy and reports bad sensor data, I'm passing the responsibility to the end user to detect and ignore such data (since I'm not able to detect it). Note that correctly working sensors will get filtered if they report SENSOR_STATUS_UNRELIABLE. This fix will only affect sensors that fail to report any accuracy data at all. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-device-motion CB-9339 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-device-motion/pull/32.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #32 commit b0f8e436efd7d0db586bc2165733ebe5467b8498 Author: Murat Sutunc sut...@gmail.com Date: 2015-07-13T21:05:37Z CB-9339 Increase the default sensor accuracy --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Correcting errors with present...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/14#issuecomment-121085416 @dylanrynhart ping --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-9193: Add 'showLibraryButto...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/104#issuecomment-120476371 Ping --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Focus control and nicer UI for...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/106#issuecomment-120461767 Thank you @Gillardo ! Merging your changes. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Focus control and nicer UI for...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/106#discussion_r34287365 --- Diff: src/windows/CameraProxy.js --- @@ -324,13 +325,20 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) { // z-order style element for capturePreview and captureCancelButton elts // is necessary to avoid overriding by another page elements, -1 sometimes is not enough -capturePreview.style.cssText = position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 999; +capturePreview.style.cssText = position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 999;; + +var buttonStyle = width:45%;padding: 10px 16px;font-size: 18px;line-height: 1.333;color: #333;background-color: #fff;border-color: #ccc; border: 1px solid transparent;border-radius: 6px; display: block; margin: 20px; z-index: 1000;border-color: #adadad;; + +// Create capture button +captureTakePhotoButton = document.createElement(button); +captureTakePhotoButton.innerText = Take; +captureTakePhotoButton.style.cssText = buttonStyle + position: fixed; left: 0; bottom: 0; margin: 20px; z-index: 1000; // Create cancel button captureCancelButton = document.createElement(button); captureCancelButton.innerText = Cancel; -captureCancelButton.style.cssText = position: fixed; right: 0; bottom: 0; display: block; margin: 20px; z-index: 1000; - +captureCancelButton.style.cssText = buttonStyle + position: fixed; right: 0; bottom: 0; margin: 20px; z-index: 1000; + --- End diff -- nit: remove trailing whitespace --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Focus control and nicer UI for...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/106#discussion_r34287483 --- Diff: src/windows/CameraProxy.js --- @@ -370,10 +395,11 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) { if (sensor !== null) { sensor.addEventListener(orientationchanged, onOrientationChange); } -capturePreview.addEventListener('click', captureAction); +//capturePreview.addEventListener('click', captureAction); --- End diff -- nit: remove comment if not necessary --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Focus control and nicer UI for...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/106#discussion_r34288565 --- Diff: src/windows/CameraProxy.js --- @@ -370,10 +395,11 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) { if (sensor !== null) { sensor.addEventListener(orientationchanged, onOrientationChange); } -capturePreview.addEventListener('click', captureAction); +//capturePreview.addEventListener('click', captureAction); --- End diff -- you can iterate with a new commit, I can merge them. Also before I can merge your changes, you need to sign Apache's Contributor License Agreement (can be done online): http://www.apache.org/licenses/#clas --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34101903 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that feature is not supported.'); +}; + +/** + * Gets a list of installed apps on the target device. This function is not supported for + * Windows Phone 8.1. + * @param targetDevice {Object} An object returned from a successful
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34101879 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that feature is not supported.'); +}; + +/** + * Gets a list of installed apps on the target device. This function is not supported for --- End diff -- nit: trailing whitespace --- If your project is set up for it, you can
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34101895 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that feature is not supported.'); +}; + +/** + * Gets a list of installed apps on the target device. This function is not supported for + * Windows Phone 8.1. + * @param targetDevice {Object} An object returned from a successful
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34101887 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that feature is not supported.'); +}; + +/** + * Gets a list of installed apps on the target device. This function is not supported for + * Windows Phone 8.1. + * @param targetDevice {Object} An object returned from a successful
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34102430 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that feature is not supported.'); +}; + +/** + * Gets a list of installed apps on the target device. This function is not supported for + * Windows Phone 8.1. + * @param targetDevice {Object} An object returned from a successful
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34101792 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks --- End diff -- nit: trailing whitespace --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34101845 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** --- End diff -- nit: trailing whitespace --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34103420 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that feature is not supported.'); +}; + +/** + * Gets a list of installed apps on the target device. This function is not supported for + * Windows Phone 8.1. + * @param targetDevice {Object} An object returned from a successful
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34103587 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that feature is not supported.'); +}; + +/** + * Gets a list of installed apps on the target device. This function is not supported for + * Windows Phone 8.1. + * @param targetDevice {Object} An object returned from a successful
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34104122 --- Diff: template/cordova/lib/target-list.js --- @@ -17,20 +17,21 @@ under the License. */ -var devices = require('./package'), +var deploy = require('./deployment'), args = process.argv.slice(2); // help/usage function function help() { console.log(''); -console.log('Usage: node target-list.js [ --emulators | --devices | --started_emulators | --all ]'); +console.log('Usage: node target-list.js [--win10] [ --emulators | --devices | --started_emulators | --all ]'); +console.log('--win10 : Chooses to list Windows 10 devices (Windows 8.1 is default).'); console.log('--emulators : List the possible target emulators availible.'); -console.log('--devices : List the possible target devices availible. *NOT IMPLEMENTED YET*'); +console.log('--devices : List the possible target devices availible.'); console.log('--started_emulators : List any started emulators availible. *NOT IMPLEMENTED YET*'); console.log('--all : List all available devices'); console.log('examples:'); -console.log('node target-list.js --emulators'); -console.log('node target-list.js --devices'); +console.log('node target-list.js --win8.1 --emulators'); --- End diff -- --win8.1 flag is unhandled --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34104129 --- Diff: template/cordova/lib/target-list.js --- @@ -40,10 +41,42 @@ function help() { if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(args[0]) -1) { help(); } else { -devices.listDevices() -.then(function (deviceList) { + +var version = '8.1'; +if (args.indexOf('--win10') = 0) { +version = '10.0'; +} + +var onlyDevices = false; +if (args.indexOf('--devices') = 0) { +onlyDevices = true; +} + +var onlyEmulators = false; +if (args.indexOf('--emulators') = 0) { +onlyEmulators = true; +} + +if (onlyDevices onlyEmulators) { +console.warn('Error: Cannot specify both --emulators and --devices'); +help(); +return; +} + --- End diff -- nit: trailing whitespace --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-windows/pull/96#issuecomment-119376109 Can you check template/cordova/lib/list-devices.bat and it's siblings to see if they still work as expected? This is a big refactor. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34101423 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { --- End diff -- I see this function everywhere in cordova codebase. We should really make a npm module out of it and publish it. Better(?) version of this function is available at cordova-lib\cordova-lib\src\cordova\superspawn.js --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9283: Add support for Windows 10 ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34103731 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,272 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that feature is not supported.'); +}; + +/** + * Gets a list of installed apps on the target device. This function is not supported for + * Windows Phone 8.1. + * @param targetDevice {Object} An object returned from a successful
[GitHub] cordova-plugin-camera pull request: CB-9193: Add 'showLibraryButto...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/104#issuecomment-119003640 I would like to hear everyone's opinion on this before going with the code review. Showing the photo gallery on bottom left seems like a custom view behavior for the stock Camera app. I've tried this with couple apps and none of them, except WhatsApp had similar behavior. I think we should think about enabling custom camera UI scenarios instead of adding more platform quirks. But as noted it's a big undertaking. Note: In WhatsApp nothing happens when you actually tap on the black thumbnail. Slack ![](http://i.imgur.com/EATE0mD.png) WhatsApp ![](http://i.imgur.com/IifJahp.png) Messages ![](http://i.imgur.com/bick3dw.png) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-registry-web pull request: CB-9209 add link from old page ...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-registry-web/pull/17 CB-9209 add link from old page to new Create a link from old page to new: ![](http://i.imgur.com/c6hAHsD.png) You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-registry-web CB-9209 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-registry-web/pull/17.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #17 commit bd296cab699214b5ea62fa857b0c5f7eb8260ad6 Author: Murat Sutunc sut...@gmail.com Date: 2015-06-18T00:07:34Z CB-9209 add link from old page to new --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-registry-web pull request: CB-9206 add search icon to sear...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-registry-web/pull/16 CB-9206 add search icon to search box You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-registry-web CB-9206 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-registry-web/pull/16.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16 commit 037c7f87bed89f00ee265820673c54bff2bd62e0 Author: Murat Sutunc sut...@gmail.com Date: 2015-06-17T22:22:03Z CB-9206 add search icon to search box --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-registry-web pull request: CB-9194 Created faq page and ad...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-registry-web/pull/13 CB-9194 Created faq page and added header Live demo at: http://people.apache.org/~muratsu/index.html You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-registry-web CB-9194 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-registry-web/pull/13.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #13 commit d9349eea71195b4e74bc5dba11c636f234c94d23 Author: Murat Sutunc sut...@gmail.com Date: 2015-06-16T23:31:21Z CB-9194 Created faq page and added header --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9164 Better error message when de...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-windows/pull/90 CB-9164 Better error message when deploying to Windows10 phone emulator Windows 10 Phone emulator is currently not supported but deployment from VS is possible. We should tell users to use VS instead, until this issue is resolved. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-windows CB-9164 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-windows/pull/90.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #90 commit d7a2a21766e9ce2edd9ec32a620bffcdcecb3c32 Author: Murat Sutunc sut...@gmail.com Date: 2015-06-11T22:15:23Z CB-9164 Better error message when deploying to Windows10 phone emulator --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-registry-web pull request: CB-9146 Initial commit for npm-...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-registry-web/pull/11 CB-9146 Initial commit for npm-search Move npm search page development to registry-web. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-registry-web CB-9146 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-registry-web/pull/11.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #11 commit dfa41d63d1456365d5665e9c4ad21fc5ce4dc3ce Author: Murat Sutunc sut...@gmail.com Date: 2015-06-09T18:23:12Z CB-9146 Initial commit for npm-search --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-mobile-spec pull request: CB-8927 Add media to cspMeta and...
Github user muratsu closed the pull request at: https://github.com/apache/cordova-mobile-spec/pull/127 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Update docs
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/100 Update docs Update docs to enhance reading experience You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-camera docs Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/100.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #100 commit 635510c160f00c1d554885f831c6abac79e16675 Author: Murat Sutunc sut...@gmail.com Date: 2015-05-07T05:37:59Z Update docs --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9097 fail with a more descriptive...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-windows/pull/89 CB-9097 fail with a more descriptive error if run as admin `cordova run` will fail for windows if invoked from admin prompt. Currently we will wait until ActivateApplication stage and fail afterwards. We should fail fast and improve user experience. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-windows CB-9097 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-windows/pull/89.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #89 commit 698a02033f5b021e64c59d06e3a5e4e6e19e8067 Author: Murat Sutunc sut...@gmail.com Date: 2015-05-29T18:00:26Z CB-9097 fail with a more descriptive error if run as admin --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-coho pull request: Improvements to coho list-pulls.
Github user muratsu commented on the pull request: https://github.com/apache/cordova-coho/pull/82#issuecomment-106893231 LGTM :shipit: --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Update README.md
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/84#issuecomment-106874924 @antonellopasella if you can edit your text I can merge it, thanks --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-coho pull request: Improvements to coho list-pulls.
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-coho/pull/82#discussion_r31345599 --- Diff: src/list-pulls.js --- @@ -23,7 +23,9 @@ var apputil = require('./apputil'); var flagutil = require('./flagutil'); var repoutil = require('./apputil'); -var GITHUB_API_URL = https://api.github.com/;; +// Set env variable CORDOVA_GIT_ACCOUNT to username:apitoken to avoid hitting GitHub rate limits. --- End diff -- my understanding was that it's just apitoken not username:apitoken eg. curl -s -I -H Authorization: token apitoken https://api.github.com/users/apache/repos --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Update docs
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/100#discussion_r31368757 --- Diff: README.md --- @@ -35,6 +35,16 @@ Although the object is attached to the global scoped `navigator`, it is not avai cordova plugin add cordova-plugin-camera +## API +- Camera +- navigator.camera.getPicture(success, fail, options) --- End diff -- It can, but it won't work outside of GH. If that's not a problem I'm :+1: --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: Update docs
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/100#discussion_r31369274 --- Diff: README.md --- @@ -83,47 +93,68 @@ quality, even if a `quality` parameter is specified. To avoid common memory problems, set `Camera.destinationType` to `FILE_URI` rather than `DATA_URL`. -### Supported Platforms + Supported Platforms + +![](doc/img/android-success.png) ![](doc/img/blackberry-success.png) ![](doc/img/browser-success.png) ![](doc/img/firefox-success.png) ![](doc/img/fireos-success.png) ![](doc/img/ios-success.png) ![](doc/img/windows-success.png) ![](doc/img/wp8-success.png) ![](doc/img/ubuntu-success.png) --- End diff -- I don't think we'll be changing these frequent enough to justify tooling. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: fix wp8.1 UI, added wp8.1 focu...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/77#issuecomment-106875324 @biodiv can you please squash and rebase it? There have been many changes on the Windows side, I would love to get this checked. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8054 Support taking picture...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/86#issuecomment-105752108 That just got fixed today. Please update :) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8054 Support taking picture...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/86#issuecomment-105598275 Make sure you've version 1.1.0 (May 06, 2015). You can check installed plugin version by executing `cordova plugin` on your project root. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8054 Support taking picture...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/86#issuecomment-105584955 Yes, this is resolved for windows phone universal. What problem are you running into with winphone8? You can always open a [jira](https://issues.apache.org/jira/browse/CB-9074?jql=project%20%3D%20CB) for us to investigate. The more information you provide, faster we can resolve the issue. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8054 Support taking picture...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/86#issuecomment-105603159 You can get the latest (edge) from [github](https://github.com/apache/cordova-plugin-camera.git) however I suggest you clone the github repo and checkout 19feee9cb049 for version 1.1.0. Releases are tested more thoroughly than edge. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-lib pull request: CB-9065 Allow removing plugins by short ...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-lib/pull/225#issuecomment-104789786 :+1: --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9059 removed targetingWin10 logic...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-windows/pull/82 CB-9059 removed targetingWin10 logic from prepare Removes isTargetingWin10 logic and fails silently in case system does not have UAP tools installed. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-windows CB-9059 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-windows/pull/82.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #82 commit c36a2a90eba43ec4dc9b9db146291979461cbd82 Author: Murat Sutunc sut...@gmail.com Date: 2015-05-21T20:50:38Z CB-9059 removed targetingWin10 logic from prepare --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9045 Create a new solution for Wi...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/78#discussion_r30723083 --- Diff: template/CordovaApp.Windows10.jsproj --- @@ -86,12 +93,11 @@ Content Include=WinJS\js\WinJS.js / None Include=WinJS\js\WinJS.intellisense.js / None Include=WinJS\js\WinJS.intellisense-setup.js / -None Include=CordovaApp_TemporaryKey.pfx / /ItemGroup - Import Project=CordovaApp.projitems Label=Shared / + Import Project=CordovaApp.projitems / --- End diff -- I dont think we actually use this label but added back to make sure we dont break anything --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: [windows] major refactor : rea...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/96#issuecomment-104064883 :shipit: looks awesome thanks for doing this! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: [windows] major refactor : rea...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/96#discussion_r30757483 --- Diff: src/windows/CameraProxy.js --- @@ -69,11 +83,13 @@ function resizeImage(successCallback, errorCallback, file, targetWidth, targetHe tempPhotoFileName = camera_cordova_temp_return.jpg; } -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +var storageFolder = getAppData().localFolder; file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting) -.then(function (storageFile) { return Windows.Storage.FileIO.readBufferAsync(storageFile); }) +.then(function (storageFile) { +return fileIO.readBufferAsync(storageFile); +}) .then(function(buffer) { -var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); +var strBase64 =encodeToBase64String(buffer); --- End diff -- nitpick: no space after = --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: [windows] major refactor : rea...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/96#discussion_r30757496 --- Diff: src/windows/CameraProxy.js --- @@ -111,8 +127,8 @@ function resizeImage(successCallback, errorCallback, file, targetWidth, targetHe // Because of asynchronous method, so let the successCallback be called in it. function resizeImageBase64(successCallback, errorCallback, file, targetWidth, targetHeight) { -Windows.Storage.FileIO.readBufferAsync(file).done( function(buffer) { -var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); +fileIO.readBufferAsync(file).done( function(buffer) { +var strBase64 =encodeToBase64String(buffer); --- End diff -- nitpick: no space after = --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: [windows] major refactor : rea...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/96#discussion_r30757436 --- Diff: src/windows/CameraProxy.js --- @@ -546,20 +575,31 @@ function takePictureFromCameraWindows(successCallback, errorCallback, args) { } // decide which max pixels should be supported by targetWidth or targetHeight. -if (targetWidth = 1280 || targetHeight = 960) { -cameraCaptureUI.photoSettings.maxResolution = Windows.Media.Capture.CameraCaptureUIMaxPhotoResolution.large3M; -} else if (targetWidth = 1024 || targetHeight = 768) { -cameraCaptureUI.photoSettings.maxResolution = Windows.Media.Capture.CameraCaptureUIMaxPhotoResolution.mediumXga; -} else if (targetWidth = 800 || targetHeight = 600) { -cameraCaptureUI.photoSettings.maxResolution = Windows.Media.Capture.CameraCaptureUIMaxPhotoResolution.mediumXga; -} else if (targetWidth = 640 || targetHeight = 480) { -cameraCaptureUI.photoSettings.maxResolution = Windows.Media.Capture.CameraCaptureUIMaxPhotoResolution.smallVga; -} else if (targetWidth = 320 || targetHeight = 240) { -cameraCaptureUI.photoSettings.maxResolution = Windows.Media.Capture.CameraCaptureUIMaxPhotoResolution.verySmallQvga; -} else { -cameraCaptureUI.photoSettings.maxResolution = Windows.Media.Capture.CameraCaptureUIMaxPhotoResolution.highestAvailable; +var maxRes = null; +var UIMaxRes = Windows.Media.Capture.CameraCaptureUIMaxPhotoResolution; +switch (true) { +case (targetWidth = 1280 || targetHeight = 960) : +cameraCaptureUI.photoSettings.maxResolution = UIMaxRes.large3M; +break; +case (targetWidth = 1024 || targetHeight = 768) : +maxRes = UIMaxRes.mediumXga; +break; +case(targetWidth = 800 || targetHeight = 600) : +maxRes = UIMaxRes.mediumXga; +break; +case (targetWidth = 640 || targetHeight = 480) : +maxRes = UIMaxRes.smallVga; +break; +case(targetWidth = 320 || targetHeight = 240) : +maxRes = UIMaxRes.verySmallQvga; +break; +default : +maxRes = UIMaxRes.highestAvailable; } +cameraCaptureUI.photoSettings.maxResolution = maxRes; + + --- End diff -- nitpick: extra line --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9045 Create a new solution for Wi...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-windows/pull/78#issuecomment-103709357 Hmm you're right on seperation of concerns. Having a new solution file isn't really a good solution to this problem. I think I have a workaround that will work with vs2013 - I'll send an update. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9045 Create a new solution for Wi...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-windows/pull/78 CB-9045 Create a new solution for Win10/Dev15 Currently in dev12 solution we're using shared project. The shared project has some logic that doesn't work with windows10 projects. (This is due to version changes we have from 8, 8.1 to 10.X.Y.Z) It looks like the best option we have is to seperate out win10 to a new solution. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-windows CB-9045 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-windows/pull/78.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #78 commit 416b99e2fbf1ad55ac5362405e2a4a52f9ee12c0 Author: Murat Sutunc sut...@gmail.com Date: 2015-05-19T21:39:19Z CB-9045 Create a new solution for Win10/Dev15 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-9045 Create a new solution for Wi...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-windows/pull/78#issuecomment-103681444 UAP and SharedProj dont play nice on VisualStudio13. My understanding is, in order to have backwards compat we need to split UAP from SharedProj. This provides a better user experience for both VS15 and VS13. Please note that this doesn't affect `cordova` commands much (very slight change in win10 jsproj) and is mostly for a better IDE experience. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8883 fix picture rotation i...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/95 CB-8883 fix picture rotation issue Improved the logic for camera/sensor rotation and adressed the camera issues. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-8883 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/95.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #95 commit 4891e046dbbe7114524cfebfb04e8f3bea0b0bcf Author: Murat Sutunc sut...@gmail.com Date: 2015-05-14T17:35:53Z CB-8883 fix picture rotation issue --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8879 fix stripe issue with ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/94#discussion_r30262108 --- Diff: src/windows/CameraProxy.js --- @@ -337,28 +336,48 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) { } }); -capture.initializeAsync(captureSettings).done(function () { -// msdn.microsoft.com/en-us/library/windows/apps/hh452807.aspx -capturePreview.msZoom = true; -capturePreview.src = URL.createObjectURL(capture); -capturePreview.play(); +captureSettings.photoCaptureSource = Windows.Media.Capture.PhotoCaptureSource.photo; -// Insert preview frame and controls into page -document.body.appendChild(capturePreview); -document.body.appendChild(captureCancelButton); +return capture.initializeAsync(captureSettings); +}).then(function () { +// msdn.microsoft.com/en-us/library/windows/apps/hh452807.aspx +capturePreview.msZoom = true; +capturePreview.src = URL.createObjectURL(capture); +capturePreview.play(); -// Bind events to controls -window.addEventListener('deviceorientation', cameraPreviewOrientation, false); -capturePreview.addEventListener('click', captureAction); -captureCancelButton.addEventListener('click', function () { -destroyCameraPreview(); -errorCallback('Cancelled'); -}, false); -}, function (err) { +// Insert preview frame and controls into page +document.body.appendChild(capturePreview); +document.body.appendChild(captureCancelButton); + +// Bind events to controls +window.addEventListener('deviceorientation', cameraPreviewOrientation, false); +capturePreview.addEventListener('click', captureAction); +captureCancelButton.addEventListener('click', function () { destroyCameraPreview(); -errorCallback('Camera intitialization error ' + err); -}); -}, errorCallback); +errorCallback('Cancelled'); +}, false); + +// Get available aspect ratios +var aspectRatios = getAspectRatios(capture); + +// Couldn't find a good ratio +if (aspectRatios.length === 0) { +destroyCameraPreview(); +errorCallback('There\'s not a good aspect ratio available'); +return; +} + +// Default aspect ratio 1.78 (16:9 hd video standard) +if (aspectRatios.indexOf(1.8) -1) { --- End diff -- i need to add jshint later to this repo --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8879 fix stripe issue with ...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/94#discussion_r30262317 --- Diff: src/windows/CameraProxy.js --- @@ -438,6 +457,61 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) { }); }; +var getAspectRatios = function (capture) { +var photoAspectRatios = capture.videoDeviceController.getAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType.photo).map(function (element) { +return (element.width / element.height).toFixed(1); +}).filter(function (element, index, array) { if (index === array.indexOf(element)) return 1; return 0; }); + +var videoAspectRatios = capture.videoDeviceController.getAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType.videoRecord).map(function (element) { +return (element.width / element.height).toFixed(1); +}).filter(function (element, index, array) { if (index === array.indexOf(element)) return 1; return 0; }); + +var videoPreviewAspectRatios = capture.videoDeviceController.getAvailableMediaStreamProperties(Windows.Media.Capture.MediaStreamType.videoPreview).map(function (element) { +return (element.width / element.height).toFixed(1); +}).filter(function (element, index, array) { if (index === array.indexOf(element)) return 1; return 0; }); + +var allAspectRatios = [].concat(photoAspectRatios, videoAspectRatios, videoPreviewAspectRatios); + +var aspectObj = allAspectRatios.reduce(function (map, item) { +if (!map[item]) { +map[item] = 0; +} +map[item]++; +return map; +}, {}); + +return Object.keys(aspectObj).filter(function (k) { +return aspectObj[k] === 3; --- End diff -- this is by design. all of the capture modes should be set to the same ratio otherwise there are artifacts on the captured image. this is a platform limitation. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8879 fix stripe issue with ...
Github user muratsu closed the pull request at: https://github.com/apache/cordova-plugin-camera/pull/94 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8879 fix stripe issue with ...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/94 CB-8879 fix stripe issue with correct aspect ratio This fixes the stripe issue we had on windows phone 8+. The fix was to set up resolutions with a common aspect ratio. Default aspect ratio is 1.78 (hd). You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-8879 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/94.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #94 commit 4710faa91d86e46df1d66c24080b55cd8d86d459 Author: Murat Sutunc sut...@gmail.com Date: 2015-05-12T00:09:43Z CB-8879 fix stripe issue with correct aspect ratio --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8943 fix PickAndContinue is...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/92 CB-8943 fix PickAndContinue issue on Win10Phone -fix PickAndContinue issue on WindowsPhone 10 -fix emulator not correctly taking pictures WindowsPhone 8.1 -change default save location from Documents to Pictures You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-camera win10merge Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/92.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #92 commit 69c687e0cfd78ba39dd36157d3e84addbb2a8e32 Author: Murat Sutunc sut...@gmail.com Date: 2015-05-06T17:49:05Z CB-8943 fix PickAndContinue issue on Win10Phone --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-coho pull request: Update setting-up-gpg.md
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-coho/pull/77 Update setting-up-gpg.md Add --keyserver for gnupg You can merge this pull request into a Git repository by running: $ git pull https://github.com/muratsu/cordova-coho patch-1 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-coho/pull/77.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #77 commit ee287f2d8f2510e1c2b14aab53129a74634415d9 Author: Murat Sutunc mura...@microsoft.com Date: 2015-05-06T18:17:51Z Update setting-up-gpg.md Add --keyserver for gnupg --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-windows pull request: CB-8486 Support for signing and buil...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-windows/pull/75 CB-8486 Support for signing and build.json for Windows Related JIRA item: https://issues.apache.org/jira/browse/CB-8483 Details of the design and scenario here: https://docs.google.com/document/d/1tJQ9OoGrrMhZcLI3mg46rGzAfbiQu9PuNBL1auAMGFM/edit# You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-windows packaging Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-windows/pull/75.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #75 commit 560c633819a63c277bc5ff80ab416332741ac0dd Author: Murat Sutunc sut...@gmail.com Date: 2015-04-14T01:17:07Z CB-8486 Support for signing and build.json for Windows --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-coho pull request: CB-8950 Add NSP to travis
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-coho/pull/74 CB-8950 Add NSP to travis -Enable travis -Add nsp to travis You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-coho CB-8950 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-coho/pull/74.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #74 commit 421e8eda6857b5a9c0f4297c5bbfe0cd418c2d96 Author: Murat Sutunc sut...@gmail.com Date: 2015-05-04T17:22:22Z CB-8950 Add NSP to travis --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-medic pull request: [CB-8870] Consolidating medic code.
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-medic/pull/47#discussion_r29370417 --- Diff: bin/lib/testcheck.js --- @@ -0,0 +1,77 @@ +var http = require('http'), +url = require('url'), +q = require('q'); + +module.exports = function (sha, dbHost) { + +function getDocumentIdBySha() { +var options = { +host : url.parse(dbHost).hostname, +port : url.parse(dbHost).port, +path : '/mobilespec_results/_all_docs?start_key=' + sha + 'limit=1' +}, +resultsDoc = '', +d = q.defer(); + +http.get(options, function (result) { +result.on(data, function (chunk) { +resultsDoc += chunk.toString(); +}); +result.on('end', function () { +d.resolve(JSON.parse(resultsDoc).rows[0].id); +}); +}).on('error', function (e) { +console.log(Got error: + e.message); +d.reject(e); +}); + +return d.promise; +}; + +function getTestResult(resultId) { +var options = { +host : url.parse(dbHost).hostname, +port : url.parse(dbHost).port, +path : '/mobilespec_results/' + resultId +}; +var d = q.defer(); +var resultsJSON = ; +var failure; --- End diff -- never used? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-mobile-spec pull request: CB-8927 Add media to cspMeta and...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-mobile-spec/pull/127 CB-8927 Add media to cspMeta and Windows as plat Fixes CSP errors on media test. Addes CSPs for Windows platform You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-mobile-spec CB-8926 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-mobile-spec/pull/127.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #127 commit 387f163810b464f96c3a0fc2f8718e47db80a806 Author: Murat Sutunc sut...@gmail.com Date: 2015-04-28T21:18:19Z CB-8927 Add media to cspMeta and Windows as plat --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8404 Rotate camera feed wit...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/88#issuecomment-94889877 Rebased and squashed - ready to merge. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8054 Support taking picture...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/86#issuecomment-94503319 This one is ready to be merged. Would be glad if someone can merge this in. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8404 Rotate camera feed wit...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/88 CB-8404 Rotate camera feed with device orientation Fixed 2 bugs in windows where we have trouble rotating the image on preview and saving You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-8404 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/88.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #88 commit 0ea0cf9b6b5c9499fb50548455df1b5fffbb47b7 Author: Murat Sutunc sut...@gmail.com Date: 2015-04-17T00:27:55Z CB-8404 Rotate camera feed with device orientation --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8054 Support taking picture...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/86#issuecomment-93788932 The docs didn't mention this as a quirk, so no doc updates. I've also updated the phone video codec list. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8054 Support taking picture...
GitHub user muratsu opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/86 CB-8054 Support taking pictures from file for WP8 Add missing take picture from file capability for WP8 You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-camera CB-8054 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/86.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #86 commit 2175a03e659a9c81243624841a04580db3c0ac3c Author: Murat Sutunc sut...@gmail.com Date: 2015-04-16T00:20:30Z CB-8054 Support taking pictures from file for WP8 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-ios pull request: CB-8855 Fix display ios devices with --l...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-ios/pull/137#issuecomment-93073824 :+1: :smile: --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8706, CB-8707 saveToPhotoAl...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/78#issuecomment-90293828 @vladimir-kotikov @sgrebnov ping --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8780: Display popover using...
Github user muratsu commented on the pull request: https://github.com/apache/cordova-plugin-camera/pull/81#issuecomment-90293689 LGTM. This also potentially fixes perf issues we have with [CB-8542](https://issues.apache.org/jira/browse/CB-8542). @shazron thoughts? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8706, CB-8707 saveToPhotoAl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/78#discussion_r27744001 --- Diff: src/windows/CameraProxy.js --- @@ -43,399 +43,468 @@ module.exports = { // 11 cameraDirection:0 takePicture: function (successCallback, errorCallback, args) { -var encodingType = args[5]; -var targetWidth = args[3]; -var targetHeight = args[4]; var sourceType = args[2]; -var destinationType = args[1]; -var mediaType = args[6]; -var allowCrop = !!args[7]; -var saveToPhotoAlbum = args[9]; -var cameraDirection = args[11]; - -// resize method :) -var resizeImage = function (file) { -var tempPhotoFileName = ; -if (encodingType == Camera.EncodingType.PNG) { -tempPhotoFileName = camera_cordova_temp_return.png; -} else { -tempPhotoFileName = camera_cordova_temp_return.jpg; -} - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; -file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting).then(function (storageFile) { - Windows.Storage.FileIO.readBufferAsync(storageFile).then(function(buffer) { -var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); -var imageData = data: + file.contentType + ;base64, + strBase64; -var image = new Image(); -image.src = imageData; -image.onload = function() { -var imageWidth = targetWidth, -imageHeight = targetHeight; -var canvas = document.createElement('canvas'); - -canvas.width = imageWidth; -canvas.height = imageHeight; -canvas.getContext(2d).drawImage(this, 0, 0, imageWidth, imageHeight); - -var fileContent = canvas.toDataURL(file.contentType).split(',')[1]; - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +if (sourceType != Camera.PictureSourceType.CAMERA) { +takePictureFromFile(successCallback, errorCallback, args); +} else { +takePictureFromCamera(successCallback, errorCallback, args); +} +} +}; -storageFolder.createFileAsync(tempPhotoFileName, Windows.Storage.CreationCollisionOption.generateUniqueName).done(function (storagefile) { -var content = Windows.Security.Cryptography.CryptographicBuffer.decodeFromBase64String(fileContent); - Windows.Storage.FileIO.writeBufferAsync(storagefile, content).then(function () { -successCallback(ms-appdata:///local/ + storagefile.name); -}, function () { -errorCallback(Resize picture error.); -}); -}); -}; -}); -}, function () { -errorCallback(Can't access localStorage folder); -}); -}; +// Resize method +function resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType) { --- End diff -- I'll make this change in a separate commit I think. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org
[GitHub] cordova-plugin-camera pull request: CB-8706, CB-8707 saveToPhotoAl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/78#discussion_r27744642 --- Diff: src/windows/CameraProxy.js --- @@ -43,399 +43,468 @@ module.exports = { // 11 cameraDirection:0 takePicture: function (successCallback, errorCallback, args) { -var encodingType = args[5]; -var targetWidth = args[3]; -var targetHeight = args[4]; var sourceType = args[2]; -var destinationType = args[1]; -var mediaType = args[6]; -var allowCrop = !!args[7]; -var saveToPhotoAlbum = args[9]; -var cameraDirection = args[11]; - -// resize method :) -var resizeImage = function (file) { -var tempPhotoFileName = ; -if (encodingType == Camera.EncodingType.PNG) { -tempPhotoFileName = camera_cordova_temp_return.png; -} else { -tempPhotoFileName = camera_cordova_temp_return.jpg; -} - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; -file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting).then(function (storageFile) { - Windows.Storage.FileIO.readBufferAsync(storageFile).then(function(buffer) { -var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); -var imageData = data: + file.contentType + ;base64, + strBase64; -var image = new Image(); -image.src = imageData; -image.onload = function() { -var imageWidth = targetWidth, -imageHeight = targetHeight; -var canvas = document.createElement('canvas'); - -canvas.width = imageWidth; -canvas.height = imageHeight; -canvas.getContext(2d).drawImage(this, 0, 0, imageWidth, imageHeight); - -var fileContent = canvas.toDataURL(file.contentType).split(',')[1]; - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +if (sourceType != Camera.PictureSourceType.CAMERA) { +takePictureFromFile(successCallback, errorCallback, args); +} else { +takePictureFromCamera(successCallback, errorCallback, args); +} +} +}; -storageFolder.createFileAsync(tempPhotoFileName, Windows.Storage.CreationCollisionOption.generateUniqueName).done(function (storagefile) { -var content = Windows.Security.Cryptography.CryptographicBuffer.decodeFromBase64String(fileContent); - Windows.Storage.FileIO.writeBufferAsync(storagefile, content).then(function () { -successCallback(ms-appdata:///local/ + storagefile.name); -}, function () { -errorCallback(Resize picture error.); -}); -}); -}; -}); -}, function () { -errorCallback(Can't access localStorage folder); -}); -}; +// Resize method +function resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType) { +var tempPhotoFileName = ; +if (encodingType == Camera.EncodingType.PNG) { +tempPhotoFileName = camera_cordova_temp_return.png; +} else { +tempPhotoFileName = camera_cordova_temp_return.jpg; +} -// because of asynchronous method, so let the successCallback be called in it. -var resizeImageBase64 = function (file) { +var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting) +.then(function (storageFile) { return Windows.Storage.FileIO.readBufferAsync(storageFile); }) +.then(function(buffer) { +var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); +var imageData = data: + file.contentType + ;base64, + strBase64; +var image = new Image(); +image.src = imageData; +image.onload = function() { +var imageWidth = targetWidth, +imageHeight = targetHeight; +var canvas = document.createElement('canvas
[GitHub] cordova-plugin-camera pull request: CB-8706, CB-8707 saveToPhotoAl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/78#discussion_r27744665 --- Diff: src/windows/CameraProxy.js --- @@ -43,399 +43,468 @@ module.exports = { // 11 cameraDirection:0 takePicture: function (successCallback, errorCallback, args) { -var encodingType = args[5]; -var targetWidth = args[3]; -var targetHeight = args[4]; var sourceType = args[2]; -var destinationType = args[1]; -var mediaType = args[6]; -var allowCrop = !!args[7]; -var saveToPhotoAlbum = args[9]; -var cameraDirection = args[11]; - -// resize method :) -var resizeImage = function (file) { -var tempPhotoFileName = ; -if (encodingType == Camera.EncodingType.PNG) { -tempPhotoFileName = camera_cordova_temp_return.png; -} else { -tempPhotoFileName = camera_cordova_temp_return.jpg; -} - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; -file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting).then(function (storageFile) { - Windows.Storage.FileIO.readBufferAsync(storageFile).then(function(buffer) { -var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); -var imageData = data: + file.contentType + ;base64, + strBase64; -var image = new Image(); -image.src = imageData; -image.onload = function() { -var imageWidth = targetWidth, -imageHeight = targetHeight; -var canvas = document.createElement('canvas'); - -canvas.width = imageWidth; -canvas.height = imageHeight; -canvas.getContext(2d).drawImage(this, 0, 0, imageWidth, imageHeight); - -var fileContent = canvas.toDataURL(file.contentType).split(',')[1]; - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +if (sourceType != Camera.PictureSourceType.CAMERA) { +takePictureFromFile(successCallback, errorCallback, args); +} else { +takePictureFromCamera(successCallback, errorCallback, args); +} +} +}; -storageFolder.createFileAsync(tempPhotoFileName, Windows.Storage.CreationCollisionOption.generateUniqueName).done(function (storagefile) { -var content = Windows.Security.Cryptography.CryptographicBuffer.decodeFromBase64String(fileContent); - Windows.Storage.FileIO.writeBufferAsync(storagefile, content).then(function () { -successCallback(ms-appdata:///local/ + storagefile.name); -}, function () { -errorCallback(Resize picture error.); -}); -}); -}; -}); -}, function () { -errorCallback(Can't access localStorage folder); -}); -}; +// Resize method +function resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType) { +var tempPhotoFileName = ; +if (encodingType == Camera.EncodingType.PNG) { +tempPhotoFileName = camera_cordova_temp_return.png; +} else { +tempPhotoFileName = camera_cordova_temp_return.jpg; +} -// because of asynchronous method, so let the successCallback be called in it. -var resizeImageBase64 = function (file) { +var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting) +.then(function (storageFile) { return Windows.Storage.FileIO.readBufferAsync(storageFile); }) +.then(function(buffer) { +var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); +var imageData = data: + file.contentType + ;base64, + strBase64; +var image = new Image(); +image.src = imageData; +image.onload = function() { +var imageWidth = targetWidth, +imageHeight = targetHeight; +var canvas = document.createElement('canvas
[GitHub] cordova-plugin-camera pull request: CB-8706, CB-8707 saveToPhotoAl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/78#discussion_r27744649 --- Diff: src/windows/CameraProxy.js --- @@ -43,399 +43,468 @@ module.exports = { // 11 cameraDirection:0 takePicture: function (successCallback, errorCallback, args) { -var encodingType = args[5]; -var targetWidth = args[3]; -var targetHeight = args[4]; var sourceType = args[2]; -var destinationType = args[1]; -var mediaType = args[6]; -var allowCrop = !!args[7]; -var saveToPhotoAlbum = args[9]; -var cameraDirection = args[11]; - -// resize method :) -var resizeImage = function (file) { -var tempPhotoFileName = ; -if (encodingType == Camera.EncodingType.PNG) { -tempPhotoFileName = camera_cordova_temp_return.png; -} else { -tempPhotoFileName = camera_cordova_temp_return.jpg; -} - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; -file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting).then(function (storageFile) { - Windows.Storage.FileIO.readBufferAsync(storageFile).then(function(buffer) { -var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); -var imageData = data: + file.contentType + ;base64, + strBase64; -var image = new Image(); -image.src = imageData; -image.onload = function() { -var imageWidth = targetWidth, -imageHeight = targetHeight; -var canvas = document.createElement('canvas'); - -canvas.width = imageWidth; -canvas.height = imageHeight; -canvas.getContext(2d).drawImage(this, 0, 0, imageWidth, imageHeight); - -var fileContent = canvas.toDataURL(file.contentType).split(',')[1]; - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +if (sourceType != Camera.PictureSourceType.CAMERA) { +takePictureFromFile(successCallback, errorCallback, args); +} else { +takePictureFromCamera(successCallback, errorCallback, args); +} +} +}; -storageFolder.createFileAsync(tempPhotoFileName, Windows.Storage.CreationCollisionOption.generateUniqueName).done(function (storagefile) { -var content = Windows.Security.Cryptography.CryptographicBuffer.decodeFromBase64String(fileContent); - Windows.Storage.FileIO.writeBufferAsync(storagefile, content).then(function () { -successCallback(ms-appdata:///local/ + storagefile.name); -}, function () { -errorCallback(Resize picture error.); -}); -}); -}; -}); -}, function () { -errorCallback(Can't access localStorage folder); -}); -}; +// Resize method +function resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType) { +var tempPhotoFileName = ; +if (encodingType == Camera.EncodingType.PNG) { +tempPhotoFileName = camera_cordova_temp_return.png; +} else { +tempPhotoFileName = camera_cordova_temp_return.jpg; +} -// because of asynchronous method, so let the successCallback be called in it. -var resizeImageBase64 = function (file) { +var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting) +.then(function (storageFile) { return Windows.Storage.FileIO.readBufferAsync(storageFile); }) +.then(function(buffer) { +var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); +var imageData = data: + file.contentType + ;base64, + strBase64; +var image = new Image(); +image.src = imageData; +image.onload = function() { +var imageWidth = targetWidth, +imageHeight = targetHeight; +var canvas = document.createElement('canvas
[GitHub] cordova-plugin-camera pull request: CB-8706, CB-8707 saveToPhotoAl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/78#discussion_r27744681 --- Diff: src/windows/CameraProxy.js --- @@ -43,399 +43,468 @@ module.exports = { // 11 cameraDirection:0 takePicture: function (successCallback, errorCallback, args) { -var encodingType = args[5]; -var targetWidth = args[3]; -var targetHeight = args[4]; var sourceType = args[2]; -var destinationType = args[1]; -var mediaType = args[6]; -var allowCrop = !!args[7]; -var saveToPhotoAlbum = args[9]; -var cameraDirection = args[11]; - -// resize method :) -var resizeImage = function (file) { -var tempPhotoFileName = ; -if (encodingType == Camera.EncodingType.PNG) { -tempPhotoFileName = camera_cordova_temp_return.png; -} else { -tempPhotoFileName = camera_cordova_temp_return.jpg; -} - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; -file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting).then(function (storageFile) { - Windows.Storage.FileIO.readBufferAsync(storageFile).then(function(buffer) { -var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); -var imageData = data: + file.contentType + ;base64, + strBase64; -var image = new Image(); -image.src = imageData; -image.onload = function() { -var imageWidth = targetWidth, -imageHeight = targetHeight; -var canvas = document.createElement('canvas'); - -canvas.width = imageWidth; -canvas.height = imageHeight; -canvas.getContext(2d).drawImage(this, 0, 0, imageWidth, imageHeight); - -var fileContent = canvas.toDataURL(file.contentType).split(',')[1]; - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +if (sourceType != Camera.PictureSourceType.CAMERA) { +takePictureFromFile(successCallback, errorCallback, args); +} else { +takePictureFromCamera(successCallback, errorCallback, args); +} +} +}; -storageFolder.createFileAsync(tempPhotoFileName, Windows.Storage.CreationCollisionOption.generateUniqueName).done(function (storagefile) { -var content = Windows.Security.Cryptography.CryptographicBuffer.decodeFromBase64String(fileContent); - Windows.Storage.FileIO.writeBufferAsync(storagefile, content).then(function () { -successCallback(ms-appdata:///local/ + storagefile.name); -}, function () { -errorCallback(Resize picture error.); -}); -}); -}; -}); -}, function () { -errorCallback(Can't access localStorage folder); -}); -}; +// Resize method +function resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType) { +var tempPhotoFileName = ; +if (encodingType == Camera.EncodingType.PNG) { +tempPhotoFileName = camera_cordova_temp_return.png; +} else { +tempPhotoFileName = camera_cordova_temp_return.jpg; +} -// because of asynchronous method, so let the successCallback be called in it. -var resizeImageBase64 = function (file) { +var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting) +.then(function (storageFile) { return Windows.Storage.FileIO.readBufferAsync(storageFile); }) +.then(function(buffer) { +var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); +var imageData = data: + file.contentType + ;base64, + strBase64; +var image = new Image(); +image.src = imageData; +image.onload = function() { +var imageWidth = targetWidth, +imageHeight = targetHeight; +var canvas = document.createElement('canvas
[GitHub] cordova-plugin-camera pull request: CB-8706, CB-8707 saveToPhotoAl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/78#discussion_r27744691 --- Diff: src/windows/CameraProxy.js --- @@ -43,399 +43,468 @@ module.exports = { // 11 cameraDirection:0 takePicture: function (successCallback, errorCallback, args) { -var encodingType = args[5]; -var targetWidth = args[3]; -var targetHeight = args[4]; var sourceType = args[2]; -var destinationType = args[1]; -var mediaType = args[6]; -var allowCrop = !!args[7]; -var saveToPhotoAlbum = args[9]; -var cameraDirection = args[11]; - -// resize method :) -var resizeImage = function (file) { -var tempPhotoFileName = ; -if (encodingType == Camera.EncodingType.PNG) { -tempPhotoFileName = camera_cordova_temp_return.png; -} else { -tempPhotoFileName = camera_cordova_temp_return.jpg; -} - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; -file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting).then(function (storageFile) { - Windows.Storage.FileIO.readBufferAsync(storageFile).then(function(buffer) { -var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); -var imageData = data: + file.contentType + ;base64, + strBase64; -var image = new Image(); -image.src = imageData; -image.onload = function() { -var imageWidth = targetWidth, -imageHeight = targetHeight; -var canvas = document.createElement('canvas'); - -canvas.width = imageWidth; -canvas.height = imageHeight; -canvas.getContext(2d).drawImage(this, 0, 0, imageWidth, imageHeight); - -var fileContent = canvas.toDataURL(file.contentType).split(',')[1]; - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +if (sourceType != Camera.PictureSourceType.CAMERA) { +takePictureFromFile(successCallback, errorCallback, args); +} else { +takePictureFromCamera(successCallback, errorCallback, args); +} +} +}; -storageFolder.createFileAsync(tempPhotoFileName, Windows.Storage.CreationCollisionOption.generateUniqueName).done(function (storagefile) { -var content = Windows.Security.Cryptography.CryptographicBuffer.decodeFromBase64String(fileContent); - Windows.Storage.FileIO.writeBufferAsync(storagefile, content).then(function () { -successCallback(ms-appdata:///local/ + storagefile.name); -}, function () { -errorCallback(Resize picture error.); -}); -}); -}; -}); -}, function () { -errorCallback(Can't access localStorage folder); -}); -}; +// Resize method +function resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType) { +var tempPhotoFileName = ; +if (encodingType == Camera.EncodingType.PNG) { +tempPhotoFileName = camera_cordova_temp_return.png; +} else { +tempPhotoFileName = camera_cordova_temp_return.jpg; +} -// because of asynchronous method, so let the successCallback be called in it. -var resizeImageBase64 = function (file) { +var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting) +.then(function (storageFile) { return Windows.Storage.FileIO.readBufferAsync(storageFile); }) +.then(function(buffer) { +var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); +var imageData = data: + file.contentType + ;base64, + strBase64; +var image = new Image(); +image.src = imageData; +image.onload = function() { +var imageWidth = targetWidth, +imageHeight = targetHeight; +var canvas = document.createElement('canvas
[GitHub] cordova-plugin-camera pull request: CB-8706, CB-8707 saveToPhotoAl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/78#discussion_r27744687 --- Diff: src/windows/CameraProxy.js --- @@ -43,399 +43,468 @@ module.exports = { // 11 cameraDirection:0 takePicture: function (successCallback, errorCallback, args) { -var encodingType = args[5]; -var targetWidth = args[3]; -var targetHeight = args[4]; var sourceType = args[2]; -var destinationType = args[1]; -var mediaType = args[6]; -var allowCrop = !!args[7]; -var saveToPhotoAlbum = args[9]; -var cameraDirection = args[11]; - -// resize method :) -var resizeImage = function (file) { -var tempPhotoFileName = ; -if (encodingType == Camera.EncodingType.PNG) { -tempPhotoFileName = camera_cordova_temp_return.png; -} else { -tempPhotoFileName = camera_cordova_temp_return.jpg; -} - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; -file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting).then(function (storageFile) { - Windows.Storage.FileIO.readBufferAsync(storageFile).then(function(buffer) { -var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); -var imageData = data: + file.contentType + ;base64, + strBase64; -var image = new Image(); -image.src = imageData; -image.onload = function() { -var imageWidth = targetWidth, -imageHeight = targetHeight; -var canvas = document.createElement('canvas'); - -canvas.width = imageWidth; -canvas.height = imageHeight; -canvas.getContext(2d).drawImage(this, 0, 0, imageWidth, imageHeight); - -var fileContent = canvas.toDataURL(file.contentType).split(',')[1]; - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +if (sourceType != Camera.PictureSourceType.CAMERA) { +takePictureFromFile(successCallback, errorCallback, args); +} else { +takePictureFromCamera(successCallback, errorCallback, args); +} +} +}; -storageFolder.createFileAsync(tempPhotoFileName, Windows.Storage.CreationCollisionOption.generateUniqueName).done(function (storagefile) { -var content = Windows.Security.Cryptography.CryptographicBuffer.decodeFromBase64String(fileContent); - Windows.Storage.FileIO.writeBufferAsync(storagefile, content).then(function () { -successCallback(ms-appdata:///local/ + storagefile.name); -}, function () { -errorCallback(Resize picture error.); -}); -}); -}; -}); -}, function () { -errorCallback(Can't access localStorage folder); -}); -}; +// Resize method +function resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType) { +var tempPhotoFileName = ; +if (encodingType == Camera.EncodingType.PNG) { +tempPhotoFileName = camera_cordova_temp_return.png; +} else { +tempPhotoFileName = camera_cordova_temp_return.jpg; +} -// because of asynchronous method, so let the successCallback be called in it. -var resizeImageBase64 = function (file) { +var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting) +.then(function (storageFile) { return Windows.Storage.FileIO.readBufferAsync(storageFile); }) +.then(function(buffer) { +var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); +var imageData = data: + file.contentType + ;base64, + strBase64; +var image = new Image(); +image.src = imageData; +image.onload = function() { +var imageWidth = targetWidth, +imageHeight = targetHeight; +var canvas = document.createElement('canvas
[GitHub] cordova-plugin-camera pull request: CB-8706, CB-8707 saveToPhotoAl...
Github user muratsu commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/78#discussion_r27744671 --- Diff: src/windows/CameraProxy.js --- @@ -43,399 +43,468 @@ module.exports = { // 11 cameraDirection:0 takePicture: function (successCallback, errorCallback, args) { -var encodingType = args[5]; -var targetWidth = args[3]; -var targetHeight = args[4]; var sourceType = args[2]; -var destinationType = args[1]; -var mediaType = args[6]; -var allowCrop = !!args[7]; -var saveToPhotoAlbum = args[9]; -var cameraDirection = args[11]; - -// resize method :) -var resizeImage = function (file) { -var tempPhotoFileName = ; -if (encodingType == Camera.EncodingType.PNG) { -tempPhotoFileName = camera_cordova_temp_return.png; -} else { -tempPhotoFileName = camera_cordova_temp_return.jpg; -} - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; -file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting).then(function (storageFile) { - Windows.Storage.FileIO.readBufferAsync(storageFile).then(function(buffer) { -var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); -var imageData = data: + file.contentType + ;base64, + strBase64; -var image = new Image(); -image.src = imageData; -image.onload = function() { -var imageWidth = targetWidth, -imageHeight = targetHeight; -var canvas = document.createElement('canvas'); - -canvas.width = imageWidth; -canvas.height = imageHeight; -canvas.getContext(2d).drawImage(this, 0, 0, imageWidth, imageHeight); - -var fileContent = canvas.toDataURL(file.contentType).split(',')[1]; - -var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +if (sourceType != Camera.PictureSourceType.CAMERA) { +takePictureFromFile(successCallback, errorCallback, args); +} else { +takePictureFromCamera(successCallback, errorCallback, args); +} +} +}; -storageFolder.createFileAsync(tempPhotoFileName, Windows.Storage.CreationCollisionOption.generateUniqueName).done(function (storagefile) { -var content = Windows.Security.Cryptography.CryptographicBuffer.decodeFromBase64String(fileContent); - Windows.Storage.FileIO.writeBufferAsync(storagefile, content).then(function () { -successCallback(ms-appdata:///local/ + storagefile.name); -}, function () { -errorCallback(Resize picture error.); -}); -}); -}; -}); -}, function () { -errorCallback(Can't access localStorage folder); -}); -}; +// Resize method +function resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType) { +var tempPhotoFileName = ; +if (encodingType == Camera.EncodingType.PNG) { +tempPhotoFileName = camera_cordova_temp_return.png; +} else { +tempPhotoFileName = camera_cordova_temp_return.jpg; +} -// because of asynchronous method, so let the successCallback be called in it. -var resizeImageBase64 = function (file) { +var storageFolder = Windows.Storage.ApplicationData.current.localFolder; +file.copyAsync(storageFolder, file.name, Windows.Storage.NameCollisionOption.replaceExisting) +.then(function (storageFile) { return Windows.Storage.FileIO.readBufferAsync(storageFile); }) +.then(function(buffer) { +var strBase64 = Windows.Security.Cryptography.CryptographicBuffer.encodeToBase64String(buffer); +var imageData = data: + file.contentType + ;base64, + strBase64; +var image = new Image(); +image.src = imageData; +image.onload = function() { +var imageWidth = targetWidth, +imageHeight = targetHeight; +var canvas = document.createElement('canvas