[jira] [Created] (CB-11326) use navigator.app.loadUrl got uncaught exception with allow-navigation

2016-05-26 Thread zhuisui (JIRA)
zhuisui created CB-11326:


 Summary: use navigator.app.loadUrl got uncaught exception with 
allow-navigation 
 Key: CB-11326
 URL: https://issues.apache.org/jira/browse/CB-11326
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin Whitelist
 Environment: Cordova 6.2.0
Reporter: zhuisui


I get this stack when {{navigator.app.loadUrl(myurl)}} with {{}}, which occurs after 
{{pluginManager.shouldAllowNavigation(myurl)}} returns true

{code}
Uncaught exception from plugin
 
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original 
thread that created a view hierarchy can touch its views.
 at 
android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6556)
 at 
android.view.ViewRootImpl.clearChildFocus(ViewRootImpl.java:3023)
 at 
android.view.ViewGroup.clearChildFocus(ViewGroup.java:964)
 at 
android.view.ViewGroup.clearChildFocus(ViewGroup.java:964)
 at 
android.view.ViewGroup.clearChildFocus(ViewGroup.java:964)
 at 
android.view.View.clearFocusInternal(View.java:5602)
 at 
android.view.View.clearFocus(View.java:5585)
 at 
android.view.ViewGroup.clearFocus(ViewGroup.java:977)
 at 
android.view.View.setFlags(View.java:10622)
 at 
android.view.View.setVisibility(View.java:7431)
 at 
org.apache.cordova.splashscreen.SplashScreen.pluginInitialize(SplashScreen.java:85)
 at 
org.apache.cordova.CordovaPlugin.privateInitialize(CordovaPlugin.java:58)
 at 
org.apache.cordova.PluginManager.getPlugin(PluginManager.java:172)
 at 
org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:98)
 at 
org.apache.cordova.PluginManager.init(PluginManager.java:87)
 at 
org.apache.cordova.CordovaWebViewImpl.loadUrlIntoView(CordovaWebViewImpl.java:138)
 at 
org.apache.cordova.CordovaWebViewImpl.showWebPage(CordovaWebViewImpl.java:216)
 at 
org.apache.cordova.CoreAndroid.loadUrl(CoreAndroid.java:203)
 at 
org.apache.cordova.CoreAndroid.execute(CoreAndroid.java:92)
 at 
org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
 at 
org.apache.cordova.PluginManager.exec(PluginManager.java:133)
 at 
org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
 at 
org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
 at 
org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
 at 
org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
 at 
android.os.Handler.dispatchMessage(Handler.java:102)
 at 
android.os.Looper.loop(Looper.java:148)
 at 
android.os.HandlerThread.run(HandlerThread.java:61)
{code}
Then, app cannot accept any command and doesn't response.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-11325) access within {{origin="*"}} cannot replace {{origin="cdvfile://*"}}

2016-05-26 Thread zhuisui (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-11325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

zhuisui updated CB-11325:
-
Description: According to doc of whitelist, {{}} will 
not reject any request to external server.But in fact, {{}} still need to be added to make core-file-plugin work 
normally.  (was: According to doc of whitelist, {{}} will 
not reject any request to external server.But in fact, {{}} still need to be added to make core-file-plugin work 
normally.)

> access within {{origin="*"}} cannot replace {{origin="cdvfile://*"}}
> 
>
> Key: CB-11325
> URL: https://issues.apache.org/jira/browse/CB-11325
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Whitelist
> Environment: Cordova 6.2.0
> cordova-plugin-whitelist 1.2.2
>Reporter: zhuisui
>
> According to doc of whitelist, {{}} will not reject any 
> request to external server.But in fact, {{}} 
> still need to be added to make core-file-plugin work normally.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-11325) access within {{origin="*"}} cannot replace {{origin="cdvfile://*"}}

2016-05-26 Thread zhuisui (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-11325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

zhuisui updated CB-11325:
-
Description: According to doc of whitelist, {{}} will 
not reject any request to external server.But in fact, {{}} still need to be added to make core-file-plugin work 
normally.  (was: According to doc of whitelist, {{}} will 
not reject any request to external server.But in fact, {{}} still need to be added to make core-file-plugin work 
normally.)

> access within {{origin="*"}} cannot replace {{origin="cdvfile://*"}}
> 
>
> Key: CB-11325
> URL: https://issues.apache.org/jira/browse/CB-11325
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Whitelist
> Environment: Cordova 6.2.0
> cordova-plugin-whitelist 1.2.2
>Reporter: zhuisui
>
> According to doc of whitelist, {{}} will not reject any 
> request to external server.But in fact, {{}} 
> still need to be added to make core-file-plugin work normally.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-11325) access within {{origin="*"}} cannot replace {{origin="cdvfile://*"}}

2016-05-26 Thread zhuisui (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-11325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

zhuisui updated CB-11325:
-
Description: According to doc of whitelist, {{}} will 
not reject any request to external server.But in fact, {{}} still need to be added to make core-file-plugin work 
normally.  (was: According to doc of whitelist, {{}} will 
not reject any request to external server.But in fact, {{}} still need to be added to make core-file-plugin work 
normally.)

> access within {{origin="*"}} cannot replace {{origin="cdvfile://*"}}
> 
>
> Key: CB-11325
> URL: https://issues.apache.org/jira/browse/CB-11325
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Whitelist
> Environment: Cordova 6.2.0
> cordova-plugin-whitelist 1.2.2
>Reporter: zhuisui
>
> According to doc of whitelist, {{}} will not reject any 
> request to external server.But in fact, {{}} 
> still need to be added to make core-file-plugin work normally.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Created] (CB-11325) access within {{origin="*"}} cannot replace {{origin="cdvfile://*"}}

2016-05-26 Thread zhuisui (JIRA)
zhuisui created CB-11325:


 Summary: access within {{origin="*"}} cannot replace 
{{origin="cdvfile://*"}}
 Key: CB-11325
 URL: https://issues.apache.org/jira/browse/CB-11325
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin Whitelist
 Environment: Cordova 6.2.0
cordova-plugin-whitelist 1.2.2
Reporter: zhuisui


According to doc of whitelist, {{}} will not reject any 
request to external server.But in fact, {{}} still 
need to be added to make core-file-plugin work normally.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11117) Preparing platforms should skip copying files which haven't changed

2016-05-26 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15303257#comment-15303257
 ] 

ASF subversion and git services commented on CB-7:
--

Commit 3d3a746cf86f63908da513a7c12001ee6dac7ebb in cordova-ios's branch 
refs/heads/master from [~jasongin]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=3d3a746 ]

CB-7: Optimize prepare for ios platform, clean prepared files

Merge updated node modules
Fix node_modules exclusions in .gitignore
Fix failing unit tests for prepare
Use platform config.xml for clean

This closes #220

Signed-off-by: Shazron Abdullah 


> Preparing platforms should skip copying files which haven't changed
> ---
>
> Key: CB-7
> URL: https://issues.apache.org/jira/browse/CB-7
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, iOS, Windows
>Reporter: Jason Ginchereau
>Assignee: Jason Ginchereau
>
> Many cordova CLI commands include a "prepare" operation, including 'cordova 
> build', 'cordova run', 'cordova plugin add', and more. Every time each of 
> those commands runs, the target platform is "prepared", which involves 
> copying all files from the [/www, 
> /platforms//platform_www, /merges/] to 
> the platform's target www folder, as well as copying a bunch of icons and 
> splash screens to platform-specific locations.
> For the very first prepare of a platform, all that file copying is necessary. 
> But most of the time after that most of the files being copied have not 
> changed and therefore don't really need to be copied again. So the typical 
> developer inner loop (edit a few source files, build and run the app, repeat) 
> is a lot slower than it could be for a Cordova project, especially one that 
> includes a significant number of source files or resources.
> Instead, Cordova should be smart enough to skip copying of files that haven't 
> changed, based on their last-modified timestamp. (But also there should still 
> be a way to force a clean/full/non-incremental build if desired.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11117) Preparing platforms should skip copying files which haven't changed

2016-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15303258#comment-15303258
 ] 

ASF GitHub Bot commented on CB-7:
-

Github user asfgit closed the pull request at:

https://github.com/apache/cordova-ios/pull/220


> Preparing platforms should skip copying files which haven't changed
> ---
>
> Key: CB-7
> URL: https://issues.apache.org/jira/browse/CB-7
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, iOS, Windows
>Reporter: Jason Ginchereau
>Assignee: Jason Ginchereau
>
> Many cordova CLI commands include a "prepare" operation, including 'cordova 
> build', 'cordova run', 'cordova plugin add', and more. Every time each of 
> those commands runs, the target platform is "prepared", which involves 
> copying all files from the [/www, 
> /platforms//platform_www, /merges/] to 
> the platform's target www folder, as well as copying a bunch of icons and 
> splash screens to platform-specific locations.
> For the very first prepare of a platform, all that file copying is necessary. 
> But most of the time after that most of the files being copied have not 
> changed and therefore don't really need to be copied again. So the typical 
> developer inner loop (edit a few source files, build and run the app, repeat) 
> is a lot slower than it could be for a Cordova project, especially one that 
> includes a significant number of source files or resources.
> Instead, Cordova should be smart enough to skip copying of files that haven't 
> changed, based on their last-modified timestamp. (But also there should still 
> be a way to force a clean/full/non-incremental build if desired.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11117) Preparing platforms should skip copying files which haven't changed

2016-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15303259#comment-15303259
 ] 

ASF GitHub Bot commented on CB-7:
-

Github user shazron commented on the pull request:

https://github.com/apache/cordova-ios/pull/220#issuecomment-222032258
  
Squashed the commits, and ran the tests -- all green.


> Preparing platforms should skip copying files which haven't changed
> ---
>
> Key: CB-7
> URL: https://issues.apache.org/jira/browse/CB-7
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, iOS, Windows
>Reporter: Jason Ginchereau
>Assignee: Jason Ginchereau
>
> Many cordova CLI commands include a "prepare" operation, including 'cordova 
> build', 'cordova run', 'cordova plugin add', and more. Every time each of 
> those commands runs, the target platform is "prepared", which involves 
> copying all files from the [/www, 
> /platforms//platform_www, /merges/] to 
> the platform's target www folder, as well as copying a bunch of icons and 
> splash screens to platform-specific locations.
> For the very first prepare of a platform, all that file copying is necessary. 
> But most of the time after that most of the files being copied have not 
> changed and therefore don't really need to be copied again. So the typical 
> developer inner loop (edit a few source files, build and run the app, repeat) 
> is a lot slower than it could be for a Cordova project, especially one that 
> includes a significant number of source files or resources.
> Instead, Cordova should be smart enough to skip copying of files that haven't 
> changed, based on their last-modified timestamp. (But also there should still 
> be a way to force a clean/full/non-incremental build if desired.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15303138#comment-15303138
 ] 

ASF GitHub Bot commented on CB-11305:
-

Github user jasongin commented on the pull request:


https://github.com/apache/cordova-plugin-file/pull/182#issuecomment-222021395
  
:shipit:


> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15303137#comment-15303137
 ] 

ASF GitHub Bot commented on CB-11305:
-

Github user jasongin commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-file/pull/182#discussion_r64836957
  
--- Diff: tests/tests.js ---
@@ -3441,6 +3441,27 @@ exports.defineAutoTests = function () {
 }
 });
 });
+describe('resolveLocalFileSystemURL on cdvfile://', function () {
+it("file.spec.147 should be able to resolve cdvfile 
applicationDirectory fs root", function(done) {
+var cdvfileApplicationDirectoryFsRootName;
+if (cordova.platformId === 'android') {
+cdvfileApplicationDirectoryFsRootName = 'assets';
+} else if (cordova.platformId === 'ios') {
+cdvfileApplicationDirectoryFsRootName = 'bundle';
+} else {
--- End diff --

I guess since "assets" is already defined and working with 
resolveLocalFileSystemURL we can't change it.

---
In reply to: 
[64836116](https://github.com/apache/cordova-plugin-file/pull/182#discussion_r64836116)
 [](ancestors = 64836116)


> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15303131#comment-15303131
 ] 

ASF GitHub Bot commented on CB-11305:
-

Github user jasongin commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-file/pull/182#discussion_r64836116
  
--- Diff: tests/tests.js ---
@@ -3441,6 +3441,27 @@ exports.defineAutoTests = function () {
 }
 });
 });
+describe('resolveLocalFileSystemURL on cdvfile://', function () {
+it("file.spec.147 should be able to resolve cdvfile 
applicationDirectory fs root", function(done) {
+var cdvfileApplicationDirectoryFsRootName;
+if (cordova.platformId === 'android') {
+cdvfileApplicationDirectoryFsRootName = 'assets';
+} else if (cordova.platformId === 'ios') {
+cdvfileApplicationDirectoryFsRootName = 'bundle';
+} else {
--- End diff --

Should we consider using the same root name all platforms to represent the 
application root installation directory? Otherwise developers are going to have 
to use similar if-else conditions in their code.


> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11117) Preparing platforms should skip copying files which haven't changed

2016-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15303115#comment-15303115
 ] 

ASF GitHub Bot commented on CB-7:
-

Github user jasongin commented on a diff in the pull request:

https://github.com/apache/cordova-windows/pull/174#discussion_r64834967
  
--- Diff: template/cordova/lib/prepare.js ---
@@ -425,19 +451,39 @@ module.exports.prepare = function (cordovaProject) {
 AppxManifest.purgeCache();
 
 // Update own www dir with project's www assets and plugins' assets 
and js-files
-return Q.when(updateWwwFrom(cordovaProject, this.locations))
+return Q.when(updateWww(cordovaProject, this.locations))
 .then(function () {
 // update project according to config.xml changes.
 return updateProjectAccordingTo(self._config, self.locations);
 })
 .then(function () {
-copyImages(cordovaProject.projectConfig, self.root);
+copyImages(cordovaProject, self.locations);
 })
 .then(function () {
 events.emit('verbose', 'Prepared windows project successfully');
 });
 };
 
+module.exports.clean = function (options) {
+// A cordovaProject isn't passed into the clean() function, because it 
might have
+// been called from the platform shell script rather than the CLI. 
Check for the
+// noPrepare option passed in by the non-CLI clean script. If that's 
present, or if
+// there's no config.xml found at the project root, then don't clean 
prepared files.
+var projectRoot = path.resolve(this.root, '../..');
+var projectConfigFile = path.join(projectRoot, 'config.xml');
--- End diff --

I updated the PRs for all 3 platforms to use the platform's config.xml for 
cleaning.

They still check for the presence of config.xml at the project root, 
because I want to be extra careful not to do this clean operation in a 
platform-centric workflow.


> Preparing platforms should skip copying files which haven't changed
> ---
>
> Key: CB-7
> URL: https://issues.apache.org/jira/browse/CB-7
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android, iOS, Windows
>Reporter: Jason Ginchereau
>Assignee: Jason Ginchereau
>
> Many cordova CLI commands include a "prepare" operation, including 'cordova 
> build', 'cordova run', 'cordova plugin add', and more. Every time each of 
> those commands runs, the target platform is "prepared", which involves 
> copying all files from the [/www, 
> /platforms//platform_www, /merges/] to 
> the platform's target www folder, as well as copying a bunch of icons and 
> splash screens to platform-specific locations.
> For the very first prepare of a platform, all that file copying is necessary. 
> But most of the time after that most of the files being copied have not 
> changed and therefore don't really need to be copied again. So the typical 
> developer inner loop (edit a few source files, build and run the app, repeat) 
> is a lot slower than it could be for a Cordova project, especially one that 
> includes a significant number of source files or resources.
> Instead, Cordova should be smart enough to skip copying of files that haven't 
> changed, based on their last-modified timestamp. (But also there should still 
> be a way to force a clean/full/non-incremental build if desired.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-11311) cordova-plugin-wkwebview-engine not working with --browserify flag

2016-05-26 Thread Darryl Pogue (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-11311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Darryl Pogue updated CB-11311:
--
Assignee: (was: Darryl Pogue)

> cordova-plugin-wkwebview-engine not working with --browserify flag
> --
>
> Key: CB-11311
> URL: https://issues.apache.org/jira/browse/CB-11311
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin WKWebViewEngine
>Affects Versions: 4.1.1
> Environment: OS X 10.11
> Cordova CLI 6.1.1
> Cordova iOS 4.1.1
> cordova-plugin-wkwebview-engine 1.0.3
>Reporter: Wilson Yang
>
> The code below for replace the exec bridge is not compatible with browserify
> {code:javascript}
> // unregister the old bridge
> cordova.define.remove('cordova/exec');
> // redefine bridge to our new bridge
> cordova.define("cordova/exec", function(require, exports, module) {
>   module.exports = execProxy;
> });
> {code}
> After using browserify flag, all scripts for www will be packed into 
> cordova.js as single file. At the same time, the `cordova.define` become 
> undefined.
> {code}
> TypeError: undefined is not an object (evaluating 'cordova.define.remove')
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Assigned] (CB-11311) cordova-plugin-wkwebview-engine not working with --browserify flag

2016-05-26 Thread Darryl Pogue (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-11311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Darryl Pogue reassigned CB-11311:
-

Assignee: Darryl Pogue

> cordova-plugin-wkwebview-engine not working with --browserify flag
> --
>
> Key: CB-11311
> URL: https://issues.apache.org/jira/browse/CB-11311
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin WKWebViewEngine
>Affects Versions: 4.1.1
> Environment: OS X 10.11
> Cordova CLI 6.1.1
> Cordova iOS 4.1.1
> cordova-plugin-wkwebview-engine 1.0.3
>Reporter: Wilson Yang
>Assignee: Darryl Pogue
>
> The code below for replace the exec bridge is not compatible with browserify
> {code:javascript}
> // unregister the old bridge
> cordova.define.remove('cordova/exec');
> // redefine bridge to our new bridge
> cordova.define("cordova/exec", function(require, exports, module) {
>   module.exports = execProxy;
> });
> {code}
> After using browserify flag, all scripts for www will be packed into 
> cordova.js as single file. At the same time, the `cordova.define` become 
> undefined.
> {code}
> TypeError: undefined is not an object (evaluating 'cordova.define.remove')
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Created] (CB-11324) Extra update available message after upgrade [nit]

2016-05-26 Thread Chris Brody (JIRA)
Chris Brody created CB-11324:


 Summary: Extra update available message after upgrade [nit]
 Key: CB-11324
 URL: https://issues.apache.org/jira/browse/CB-11324
 Project: Apache Cordova
  Issue Type: Bug
  Components: CLI
Reporter: Chris Brody
Priority: Trivial


I am reporting this from my Windows system but I also saw this happen on my Mac 
OSX system.

After using npm to upgrade Cordova, I use cordova --version to check the 
version that is installed and it gives me a nice message that an update is 
available. If I try cordova --version again the message then goes away.

C:\Users\Chris\Documents\git> cordova --version
? May Cordova anonymously report usage statistics to improve the tool over 
time? Yes

Thanks for opting into telemetry to help us improve cordova.
6.2.0


┌──┐
│ Update available: 6.2.0 (current: 6.1.1) │
│ Run npm install -g cordova to update.│
└──┘

C:\Users\Chris\Documents\git> cordova --version
6.2.0
C:\Users\Chris\Documents\git>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11099) Crashing when select dropdown in android Motorola Droid Turbo 2

2016-05-26 Thread Andre Woodley (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15302694#comment-15302694
 ] 

Andre Woodley commented on CB-11099:


Its happening on iPads as well

*** Terminating app due to uncaught exception 'NSRangeException', reason: 
'-[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: 
row (0) beyond bounds (0) for section (0).'
*** First throw call stack:
(0x182392db0 0x1819f7f80 0x182392cf8 0x1877267b4 0x18772612c 0x187a3cdd4 
0x187501374 0x1875010e8 0x18784833c 0x18779b0c8 0x1877a8a80 0x1874da5a4 
0x182348728 0x1823464cc 0x1823468fc 0x182270c50 0x183b58088 0x187552088 
0x10001a298 0x181e0e8b8) 

> Crashing when select dropdown in android Motorola Droid Turbo 2
> ---
>
> Key: CB-11099
> URL: https://issues.apache.org/jira/browse/CB-11099
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Android
>Affects Versions: 6.0.0
>Reporter: BeTop
>Priority: Minor
>
> The  app crashes when choose select on an Motorola Droid Turbo 2, Android 
> Version 6.0.
> Here are the crucial logcat lines. They start with when I tap the dropdown.
> 04-16 12:04:32.045: D/cr_Ime(13068): [InputMethodManagerWrapper.java:56] 
> isActive: true
> 04-16 12:04:32.045: D/cr_Ime(13068): [InputMethodManagerWrapper.java:65] 
> hideSoftInputFromWindow
> 04-16 12:04:37.181: I/chromium(13068): [INFO:CONSOLE(25)] "No 
> Content-Security-Policy meta tag found. Please add one when using the 
> cordova-plugin-whitelist plugin.", source: 
> file:///android_asset/www/plugins/cordova-plugin-whitelist/whitelist.js (25)
> 04-16 12:04:44.204: W/Adreno-GSL(13068): : ioctl fd 38 
> code 0x40180917 (IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_CTXTID) failed: 
> errno 16 Device or resource busy
> 04-16 12:04:44.204: W/Adreno-GSL(13068): : ioctl fd 38 
> code 0x40180917 (IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_CTXTID) failed: 
> errno 16 Device or resource busy
> 04-16 12:04:44.205: W/Adreno-GSL(13068): : ioctl fd 38 
> code 0x40180917 (IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_CTXTID) failed: 
> errno 16 Device or resource busy
> 04-16 12:04:44.205: W/Adreno-GSL(13068): - beginning of crash
> Everytime the app crashes there is one or more of these at the end of the log:
> W/Adreno-GSL(13068): ... (IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_CTXTID) 
> failed: errno 16 Device or resource busy



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-11323) `cordova platform update ios` resets entire Xcode project

2016-05-26 Thread Tom Bell (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-11323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom Bell updated CB-11323:
--
Description: 
I run `cordova update platform ios` to make sure it's up to date. The platform 
is up to date, but running `cordova update platform ios` basically nukes the 
Xcode project and essentially creates a "new" project.

This means the following gets removed/reset:
* Plugins removed
* Additional schemes removed
* Modified source file changes removed

This means we can't actually customise any native code for the platform without 
it getting reset by an update.

If this is the case where the platform is some "dumb" base project, how are 
people expected to have different schemes and changes to native code?

Are we expected to create a bunch of "hooks" that basically find/replace the 
code with our changes, not exactly user friendly?

  was:
I run `cordova update platform ios` to make sure it's up to date. The platform 
is up to date, but running `cordova update platform ios` basically nukes the 
Xcode project and essentially creates a "new" project.

This means the following gets removed/reset:
* Plugins removed
* Additional schemes removed
* Modified source file changes removed

This means we can't actually customise any native code for the platform without 
it getting reset by an update.

If this is the case where the platform is some "dumb" base project, how are 
people expected to have different schemes and changes to native code?

Are expected to create a bunch of "hooks" that basically find/replace the code 
with our changes, not exactly user friendly?


> `cordova platform update ios` resets entire Xcode project
> -
>
> Key: CB-11323
> URL: https://issues.apache.org/jira/browse/CB-11323
> Project: Apache Cordova
>  Issue Type: Bug
>Affects Versions: 6.2.0
> Environment: OSX 10.11.5
>Reporter: Tom Bell
>
> I run `cordova update platform ios` to make sure it's up to date. The 
> platform is up to date, but running `cordova update platform ios` basically 
> nukes the Xcode project and essentially creates a "new" project.
> This means the following gets removed/reset:
> * Plugins removed
> * Additional schemes removed
> * Modified source file changes removed
> This means we can't actually customise any native code for the platform 
> without it getting reset by an update.
> If this is the case where the platform is some "dumb" base project, how are 
> people expected to have different schemes and changes to native code?
> Are we expected to create a bunch of "hooks" that basically find/replace the 
> code with our changes, not exactly user friendly?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-11323) `cordova platform update ios` resets entire Xcode project

2016-05-26 Thread Tom Bell (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-11323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom Bell updated CB-11323:
--
Description: 
I run `cordova update platform ios` to make sure it's up to date. The platform 
is up to date, but running `cordova update platform ios` basically nukes the 
Xcode project and essentially creates a "new" project.

This means the following gets removed/reset:
* Plugins removed
* Additional schemes removed
* Modified source file changes removed

This means we can't actually customise any native code for the platform without 
it getting reset by an update.

If this is the case where the platform is some "dumb" base project, how are 
people expected to have different schemes and changes to native code?

Are expected to create a bunch of "hooks" that basically find/replace the code 
with our changes, not exactly user friendly?

  was:
I run `cordova update platform ios` to make sure it's up to date. The platform 
is up to date, but running `cordova update platform ios` basically nukes the 
Xcode project and essentially a "new" project.

This means the following gets removed/reset:
* Plugins removed
* Additional schemes removed
* Modified source file changes removed

This means we can't actually customise any native code for the platform without 
it getting reset by an update.

If this is the case where the platform is some "dumb" base project, how are 
people expected to have different schemes and changes to native code?

Are expected to create a bunch of "hooks" that basically find/replace the code 
with our changes, not exactly user friendly?


> `cordova platform update ios` resets entire Xcode project
> -
>
> Key: CB-11323
> URL: https://issues.apache.org/jira/browse/CB-11323
> Project: Apache Cordova
>  Issue Type: Bug
>Affects Versions: 6.2.0
> Environment: OSX 10.11.5
>Reporter: Tom Bell
>
> I run `cordova update platform ios` to make sure it's up to date. The 
> platform is up to date, but running `cordova update platform ios` basically 
> nukes the Xcode project and essentially creates a "new" project.
> This means the following gets removed/reset:
> * Plugins removed
> * Additional schemes removed
> * Modified source file changes removed
> This means we can't actually customise any native code for the platform 
> without it getting reset by an update.
> If this is the case where the platform is some "dumb" base project, how are 
> people expected to have different schemes and changes to native code?
> Are expected to create a bunch of "hooks" that basically find/replace the 
> code with our changes, not exactly user friendly?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Created] (CB-11323) `cordova platform update ios` resets entire Xcode project

2016-05-26 Thread Tom Bell (JIRA)
Tom Bell created CB-11323:
-

 Summary: `cordova platform update ios` resets entire Xcode project
 Key: CB-11323
 URL: https://issues.apache.org/jira/browse/CB-11323
 Project: Apache Cordova
  Issue Type: Bug
Affects Versions: 6.2.0
 Environment: OSX 10.11.5
Reporter: Tom Bell


I run `cordova update platform ios` to make sure it's up to date. The platform 
is up to date, but running `cordova update platform ios` basically nukes the 
Xcode project and essentially a "new" project.

This means the following gets removed/reset:
* Plugins removed
* Additional schemes removed
* Modified source file changes removed

This means we can't actually customise any native code for the platform without 
it getting reset by an update.

If this is the case where the platform is some "dumb" base project, how are 
people expected to have different schemes and changes to native code?

Are expected to create a bunch of "hooks" that basically find/replace the code 
with our changes, not exactly user friendly?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread zhuisui (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15302182#comment-15302182
 ] 

zhuisui commented on CB-11305:
--

It looks complex.

> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15302140#comment-15302140
 ] 

ASF GitHub Bot commented on CB-11305:
-

Github user cordova-qa commented on the pull request:


https://github.com/apache/cordova-plugin-file/pull/182#issuecomment-221885746
  
Cordova CI Build has one or more failures. 

**Commit** - 
[Link](https://github.com/apache/cordova-plugin-file/pull/182/commits/5fcd90dbeb711fe9615307c08678b15746adbd02)
**Dashboard** - 
[Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10/)

| Builder Name  | Console Output | Test Report | Device Logs  |
| :---: | :---:  |   :---: | :---:|
| [Windows 8.1 Store]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-8.1-store/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-8.1-store/console)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-8.1-store/testReport/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-8.1-store/artifact/)
 |
| [Windows 10  Store]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-10-store/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-10-store/console)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-10-store/testReport/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-10-store/artifact/)
 |
| [Windows 8.1 Phone]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-8.1-phone/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-8.1-phone/console)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-8.1-phone/testReport/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=windows-slave,platformName=windows-8.1-phone/artifact/)
 |
| [iOS]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=mac-slave,platformName=ios/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=mac-slave,platformName=ios/console)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=mac-slave,platformName=ios/testReport/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=mac-slave,platformName=ios/artifact/)
 |
| [Android Mac]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=mac-slave,platformName=android/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=mac-slave,platformName=android/console)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=mac-slave,platformName=android/testReport/)
 | [Link]( 
http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-file-pr/10//label=mac-slave,platformName=android/artifact/)
 |
 



> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Comment Edited] (CB-9082) Accelerometer not working on moto G 2

2016-05-26 Thread Joaquim Rego (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-9082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15302124#comment-15302124
 ] 

Joaquim Rego edited comment on CB-9082 at 5/26/16 2:14 PM:
---

I've found the exact same issue.

The problem happens when the device doesn't report accuracy changes - while in 
CB-9339, the default accuracy was set to medium, thus apparently solving the 
problem, when we stop watching acceleration, the accuracy is set to 
unreliable... the next time you start it again, it will already be set to 
unreliable and it won't report any acceleration.

{code}
private void stop() {
stopTimeout();
if (this.status != AccelListener.STOPPED) {
this.sensorManager.unregisterListener(this);
}
this.setStatus(AccelListener.STOPPED);
this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}
{code}


I think this can be fixed either by:

# *Don't reset acceleration on stop*: This would change the behavior when the 
device reports accuracy, because upon restart, app will use the same accuracy 
as the last onAccuracyChanged, and that may be inconsistent with real accuracy 
(until a new onAccuracyChanged is triggered). I don't know if this can actually 
happen, given that in my experience, when the device reports accuracy, it will 
do it immediately after registering the acceleration listener - of course 
that's not documented, and unsafer to assume...
# *Always set acceleration to medium before starting*: Similar drawbacks as the 
1st solution - when reporting, we may be setting a value higher than the 
current value and it will only be fixed when the 1st onAccuracyChange is 
triggered. So, it won't change the stop behavior, but we would end up with 2 
lines for a behavior similar to option 1;
# *Reset acceleration on stop only if onAccuracyChanged was triggered*: the 
most reliable option, given that it keeps the same behavior when device 
triggers accuracy changes - have a flag for when onAccuracyChanged is triggered 
and reset or don't reset accordingly (if it doesn't trigger accuracy, don't 
reset; if it does reset).


was (Author: joaquim.rego):
I've found the exact same issue.

The problem happens when the device doesn't report accuracy changes - while in 
CB-9339, the default accuracy was set to medium, thus apparently solving the 
problem, when we stop watching acceleration, the accuracy is set to 
unreliable... the next time you start it again, it will already be set to 
unreliable and it won't report any acceleration.

{code}
private void stop() {
stopTimeout();
if (this.status != AccelListener.STOPPED) {
this.sensorManager.unregisterListener(this);
}
this.setStatus(AccelListener.STOPPED);
this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}
{code}


I think this can be fixed either by:

# *Don't reset acceleration on stop*: This would change the behavior when the 
device reports accuracy, because upon restart, app will use the same accuracy 
as the last onAccuracyChanged, and that may be inconsistent with real accuracy 
(until a new onAccuracyChanged is triggered). I don't know if this can actually 
happen, given that in my experience, when the device reports accuracy, it will 
do it immediately after registering the acceleration listener - of course 
that's not documented, and unsafer to assume...

# *Always set acceleration to medium before starting*: Similar drawbacks as the 
1st solution - when reporting, we may be setting a value higher than the 
current value and it will only be fixed when the 1st onAccuracyChange is 
triggered. So, it won't change the stop behavior, but we would end up with 2 
lines for a behavior similar to option 1;

# *Reset acceleration on stop only if onAccuracyChanged was triggered*: the 
most reliable option, given that it keeps the same behavior when device 
triggers accuracy changes - have a flag for when onAccuracyChanged is triggered 
and reset or don't reset accordingly (if it doesn't trigger accuracy, don't 
reset; if it does reset).

> Accelerometer not working on moto G 2
> -
>
> Key: CB-9082
> URL: https://issues.apache.org/jira/browse/CB-9082
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Device Motion
> Environment: Android
>Reporter: thiago ramires kairala
>
> Accelerometer doesn't work on moto g 2 but works on any other device



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-9082) Accelerometer not working on moto G 2

2016-05-26 Thread Joaquim Rego (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-9082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15302124#comment-15302124
 ] 

Joaquim Rego commented on CB-9082:
--

I've found the exact same issue.

The problem happens when the device doesn't report accuracy changes - while in 
CB-9339, the default accuracy was set to medium, thus apparently solving the 
problem, when we stop watching acceleration, the accuracy is set to 
unreliable... the next time you start it again, it will already be set to 
unreliable and it won't report any acceleration.

{code}
private void stop() {
stopTimeout();
if (this.status != AccelListener.STOPPED) {
this.sensorManager.unregisterListener(this);
}
this.setStatus(AccelListener.STOPPED);
this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE;
}
{code}


I think this can be fixed either by:

# *Don't reset acceleration on stop*: This would change the behavior when the 
device reports accuracy, because upon restart, app will use the same accuracy 
as the last onAccuracyChanged, and that may be inconsistent with real accuracy 
(until a new onAccuracyChanged is triggered). I don't know if this can actually 
happen, given that in my experience, when the device reports accuracy, it will 
do it immediately after registering the acceleration listener - of course 
that's not documented, and unsafer to assume...

# *Always set acceleration to medium before starting*: Similar drawbacks as the 
1st solution - when reporting, we may be setting a value higher than the 
current value and it will only be fixed when the 1st onAccuracyChange is 
triggered. So, it won't change the stop behavior, but we would end up with 2 
lines for a behavior similar to option 1;

# *Reset acceleration on stop only if onAccuracyChanged was triggered*: the 
most reliable option, given that it keeps the same behavior when device 
triggers accuracy changes - have a flag for when onAccuracyChanged is triggered 
and reset or don't reset accordingly (if it doesn't trigger accuracy, don't 
reset; if it does reset).

> Accelerometer not working on moto G 2
> -
>
> Key: CB-9082
> URL: https://issues.apache.org/jira/browse/CB-9082
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Device Motion
> Environment: Android
>Reporter: thiago ramires kairala
>
> Accelerometer doesn't work on moto g 2 but works on any other device



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15302118#comment-15302118
 ] 

ASF GitHub Bot commented on CB-11305:
-

GitHub user daserge opened a pull request:

https://github.com/apache/cordova-plugin-file/pull/182

CB-11305 Enable cdvfile: assets fs root for DOM requests



### Platforms affected
Android

### What does this PR do?
Added test for `cdvfile` `applicationDirectory` fs root.
Updated the docs and added the `assets` to Android available fs roots list.

### What testing has been done on this change?
Jasmine auto and manual tests, app tests (see 
[Jira](https://issues.apache.org/jira/browse/CB-11305))


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-plugin-file CB-11305

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-file/pull/182.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 #182


commit 5fcd90dbeb711fe9615307c08678b15746adbd02
Author: daserge 
Date:   2016-05-26T13:27:31Z

CB-11305 Enable cdvfile: assets fs root for DOM requests

Added test for cdvfile applicationDirectory fs root
Updated the docs and added the assets to Android available fs roots list




> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11294) Cordova-Ubuntu Platform Release

2016-05-26 Thread David Barth (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15302096#comment-15302096
 ] 

David Barth commented on CB-11294:
--

Prepare Release
Testing
- create a new app
- build and run on a device
Push Changes
Publish RC to dist/dev


> Cordova-Ubuntu Platform Release
> ---
>
> Key: CB-11294
> URL: https://issues.apache.org/jira/browse/CB-11294
> Project: Apache Cordova
>  Issue Type: Task
>  Components: Ubuntu
>Reporter: David Barth
>Assignee: David Barth
>
> Following steps at 
> https://github.com/apache/cordova-coho/blob/master/docs/platforms-release-process.md



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-11322) iOS camera stops taking new photos after calling cleanup twice

2016-05-26 Thread Paul Hickman (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-11322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Hickman updated CB-11322:
--
Attachment: cameratest.tar.gz

Sample application to demonstrate the problem. Extract and run:

cordova platform add ios
cordova prepare
then launch from xcode on an iPhone

Relevant javascript is in index.js at the bottom of the app class

> iOS camera stops taking new photos after calling cleanup twice
> --
>
> Key: CB-11322
> URL: https://issues.apache.org/jira/browse/CB-11322
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera
>Affects Versions: 2.2.0
> Environment: Cordova 6.2
> Cordova iOS Platform 4.1.1
> Camera Plugin 2.2.0
> Mac OSX Yosemite / XCode 7.3
> iOS 9.3.2
>Reporter: Paul Hickman
> Attachments: cameratest.tar.gz
>
>
> If you 
> 1. Take a photo with source = CAMERA, target = FILE_URI
> 2. Cleanup
> 3. Take another photo with source = CAMERA, target = FILE_URI
> 4. Cleanup
> 5. Take another photo with source = CAMERA, target = FILE_URI
> Then the file returned in step 5 is the picture taken in step 3, not the 
> picture taken in step 5.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Created] (CB-11322) iOS camera stops taking new photos after calling cleanup twice

2016-05-26 Thread Paul Hickman (JIRA)
Paul Hickman created CB-11322:
-

 Summary: iOS camera stops taking new photos after calling cleanup 
twice
 Key: CB-11322
 URL: https://issues.apache.org/jira/browse/CB-11322
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin Camera
Affects Versions: 2.2.0
 Environment: Cordova 6.2
Cordova iOS Platform 4.1.1
Camera Plugin 2.2.0
Mac OSX Yosemite / XCode 7.3
iOS 9.3.2
Reporter: Paul Hickman


If you 

1. Take a photo with source = CAMERA, target = FILE_URI
2. Cleanup
3. Take another photo with source = CAMERA, target = FILE_URI
4. Cleanup
5. Take another photo with source = CAMERA, target = FILE_URI

Then the file returned in step 5 is the picture taken in step 3, not the 
picture taken in step 5.





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11067) Content-Length missing in multipart form upload header on Android

2016-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301946#comment-15301946
 ] 

ASF GitHub Bot commented on CB-11067:
-

Github user daserge commented on the pull request:


https://github.com/apache/cordova-plugin-file-transfer/pull/140#issuecomment-221841464
  
@oddcb, yes, `Content-Length` should be added by 
`setFixedLengthStreamingMode`.
Which Android OS version had the issue?
Could you try it again with the master plugin version?
Do you use chunked mode for requests (Content-Length should not be present 
in case of chunked mode)?


> Content-Length missing in multipart form upload header on Android
> -
>
> Key: CB-11067
> URL: https://issues.apache.org/jira/browse/CB-11067
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File Transfer
> Environment: Plugin version 1.5.0
> chunked = false
>Reporter: Odd Christer Brovig
>  Labels: Android, triaged
>
> On iOS Content-Length is sent as part of header for multipart form. On 
> Android only Content-Disposition and Content-Type is sent.
> Is there a special reason for this? I see that the file size is read after 
> the beforeData is converted to bytes.
> From FileTransfer.java:
> {code:java}
> 
> beforeData.append(LINE_START).append(BOUNDARY).append(LINE_END);
> beforeData.append("Content-Disposition: form-data; 
> name=\"").append(fileKey).append("\";");
> beforeData.append(" 
> filename=\"").append(fileName).append('"').append(LINE_END);
> beforeData.append("Content-Type: 
> ").append(mimeType).append(LINE_END).append(LINE_END);
> byte[] beforeDataBytes = 
> beforeData.toString().getBytes("UTF-8");
> byte[] tailParamsBytes = (LINE_END + LINE_START + 
> BOUNDARY + LINE_START + LINE_END).getBytes("UTF-8");
> {code}
> From CDVFileTransfer.m:
> {code}
> [postBodyBeforeFile appendData:formBoundaryData];
> [postBodyBeforeFile appendData:[[NSString 
> stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"; 
> filename=\"%@\"\r\n", fileKey, fileName] 
> dataUsingEncoding:NSUTF8StringEncoding]];
> if (mimeType != nil) {
> [postBodyBeforeFile appendData:[[NSString 
> stringWithFormat:@"Content-Type: %@\r\n", mimeType] 
> dataUsingEncoding:NSUTF8StringEncoding]];
> }
> [postBodyBeforeFile appendData:[[NSString 
> stringWithFormat:@"Content-Length: %ld\r\n\r\n", (long)[fileData length]] 
> dataUsingEncoding:NSUTF8StringEncoding]];
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11067) Content-Length missing in multipart form upload header on Android

2016-05-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301933#comment-15301933
 ] 

ASF GitHub Bot commented on CB-11067:
-

Github user oddcb commented on the pull request:


https://github.com/apache/cordova-plugin-file-transfer/pull/140#issuecomment-221839381
  
Thanks for you reply @daserge 

So I'm not very into how file uploads are done properly, but the problem I 
fixed for our api here was adding the Content-Length into the code block 
starting at: 


https://github.com/apache/cordova-plugin-file-transfer/blob/9347606dd33fe07ea36799b4dd28804019c68835/src/android/FileTransfer.java#L406

Result:

```java
 

beforeData.append(LINE_START).append(BOUNDARY).append(LINE_END);
beforeData.append("Content-Disposition: form-data; 
name=\"").append(fileKey).append("\";");
beforeData.append(" 
filename=\"").append(fileName).append('"').append(LINE_END);

if(filesize > -1)
beforeData.append("Content-Length: 
").append(filesize).append(LINE_END);

beforeData.append("Content-Type: 
").append(mimeType).append(LINE_END).append(LINE_END);
byte[] beforeDataBytes = 
beforeData.toString().getBytes("UTF-8");
byte[] tailParamsBytes = (LINE_END + LINE_START + 
BOUNDARY + LINE_START + LINE_END).getBytes("UTF-8");
int stringLength = beforeDataBytes.length + 
tailParamsBytes.length;
```

As far as I can tell it is also what happens for iOS in 
https://github.com/apache/cordova-plugin-file-transfer/blob/9347606dd33fe07ea36799b4dd28804019c68835/src/ios/CDVFileTransfer.m#L222

``` [postBodyBeforeFile appendData:[[NSString 
stringWithFormat:@"Content-Length: %ld\r\n\r\n", (long)[fileData length]] 
dataUsingEncoding:NSUTF8StringEncoding]];```

History for us is just that our ios app was working with the file upload 
plugin as is, but when we added the android app with the plugin it did not send 
Content-Length as iOS did and hence our file upload API started to scream. We 
are using Jersey in our backend.

As far as I can tell your opinion is that this added code should not be 
required interacting with a standard api?


> Content-Length missing in multipart form upload header on Android
> -
>
> Key: CB-11067
> URL: https://issues.apache.org/jira/browse/CB-11067
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File Transfer
> Environment: Plugin version 1.5.0
> chunked = false
>Reporter: Odd Christer Brovig
>  Labels: Android, triaged
>
> On iOS Content-Length is sent as part of header for multipart form. On 
> Android only Content-Disposition and Content-Type is sent.
> Is there a special reason for this? I see that the file size is read after 
> the beforeData is converted to bytes.
> From FileTransfer.java:
> {code:java}
> 
> beforeData.append(LINE_START).append(BOUNDARY).append(LINE_END);
> beforeData.append("Content-Disposition: form-data; 
> name=\"").append(fileKey).append("\";");
> beforeData.append(" 
> filename=\"").append(fileName).append('"').append(LINE_END);
> beforeData.append("Content-Type: 
> ").append(mimeType).append(LINE_END).append(LINE_END);
> byte[] beforeDataBytes = 
> beforeData.toString().getBytes("UTF-8");
> byte[] tailParamsBytes = (LINE_END + LINE_START + 
> BOUNDARY + LINE_START + LINE_END).getBytes("UTF-8");
> {code}
> From CDVFileTransfer.m:
> {code}
> [postBodyBeforeFile appendData:formBoundaryData];
> [postBodyBeforeFile appendData:[[NSString 
> stringWithFormat:@"Content-Disposition: form-data; name=\"%@\"; 
> filename=\"%@\"\r\n", fileKey, fileName] 
> dataUsingEncoding:NSUTF8StringEncoding]];
> if (mimeType != nil) {
> [postBodyBeforeFile appendData:[[NSString 
> stringWithFormat:@"Content-Type: %@\r\n", mimeType] 
> dataUsingEncoding:NSUTF8StringEncoding]];
> }
> [postBodyBeforeFile appendData:[[NSString 
> stringWithFormat:@"Content-Length: %ld\r\n\r\n", (long)[fileData length]] 
> dataUsingEncoding:NSUTF8StringEncoding]];
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11307) Can't create file with cordova.file.dataDirectory or cordova.file.cacheDirectory

2016-05-26 Thread decagon (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301909#comment-15301909
 ] 

decagon commented on CB-11307:
--

Actually , I just made the test with a new project ( different) and it seems to 
work . 
I will investigate to see what can cause the bug in my other project.

Regards

> Can't create file with cordova.file.dataDirectory or 
> cordova.file.cacheDirectory
> 
>
> Key: CB-11307
> URL: https://issues.apache.org/jira/browse/CB-11307
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: Visual studio 2015 with cordova, Android 4.4.2
>Reporter: decagon
>Assignee: Sergey Shakhnazarov
>  Labels: triaged, wfc
>
> I'm trying to create and write to a file in cordova.file.dataDirectory
> (file:///data/data//files/) or cordova.file.cacheDirectory.
> But without success on android 4.4.2 .
> The code fails on :
> or using : 
> fs.root.getFile("myfile.txt", { create: true, exclusive: false }, function () 
> {}, function () {});
> Example of code :
> window.resolveLocalFileSystemURL(cordova.file.dataDirectory,
>   function (directoryEntry) { // success
>   directoryEntry.getFile('myfile.txt', { create: true },
>   function (fileEntry) { //success
>   fileEntry.createWriter(
>   function (fileWriter) { // success
>   fileWriter.onwriteend = 
> function () {
>   console.log("OK");
>   };
>   fileWriter.onerror = function 
> (e) {
>   console.log("Not OK");
>   };
>   // If data object is not passed 
> in,
>   // create a new Blob instead.
>   if (!data) {
>   data = new Blob([' '], 
> { type: 'text/plain' });
>   }
>   data = JSON.stringify(data);
>   var blob = new Blob([data], { 
> type: 'text/plain' });
>   fileWriter.write(blob);
>   },
>   function (e) { // error
>   console.log(e);
>   }
>   );
>   },
>   function (e) { // error
>   console.log(e);
>   }
>   );
>   },
>   function (e) { // error
>   console.log(e);
>   }
> );
> directoryEntry.getFile doesn't work.
> However, it works on Android 6



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11301) Android Media Buttons only signalled after release

2016-05-26 Thread Ruediger Jungbeck (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301729#comment-15301729
 ] 

Ruediger Jungbeck commented on CB-11301:


That is where I came from. I tried to use a standard plugin, then implemented a 
custom plugin only to find out, that the events reach my plugin 
(MediaButtonEventReceiver) after the fact (ie when the button has already been 
released). The only simple way, that I see, would be to change the the 
KeyEventHandler (which sees the event at the right point in time (if the the 
app is in the foreground).  I have tested this with debug messages. 

I understand your concerns of course. Maybe we can implement a generic 
mechanism, that passes all key events either as Cordova events (like the 
volumeup/volumedown) into Javascript (with the native event in the call 
parameters), or (a bit more complicated to implement) into the plugins (that 
can choose to handle them).  This would enable others to use the extended 
infrastructure for their needs and at the same time move the testing / 
complexity out of the basic Android platform support.

I could implement this changes. But I need them accepted upstream, so that we 
can easily upgrade to future Cordova versions.

> Android Media Buttons only signalled after release
> --
>
> Key: CB-11301
> URL: https://issues.apache.org/jira/browse/CB-11301
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Android
>Reporter: Ruediger Jungbeck
>Priority: Minor
>  Labels: features
>
> The media button (on  Android headsets) issue events when pressed or 
> released. There is a Cordova plugin that installs a BroadcastReceiver for 
> Media Button intents. But this intents occur after the physical button has 
> already been released (to distinguish short and long presses). This prevenets 
> the use of the media button as a PTT (push to talk) kery. So there should be 
> a handling for the media button that is similar to the handling of the 
> volumeup/volumedown In onDispatchKeyEvent



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11307) Can't create file with cordova.file.dataDirectory or cordova.file.cacheDirectory

2016-05-26 Thread Sergey Shakhnazarov (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301721#comment-15301721
 ] 

Sergey Shakhnazarov commented on CB-11307:
--

I've tested this on 4.4 emulator, 4.3 and 5.1.1 devices and it worked.
Are there any error details in the callback?

> Can't create file with cordova.file.dataDirectory or 
> cordova.file.cacheDirectory
> 
>
> Key: CB-11307
> URL: https://issues.apache.org/jira/browse/CB-11307
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: Visual studio 2015 with cordova, Android 4.4.2
>Reporter: decagon
>Assignee: Sergey Shakhnazarov
>  Labels: triaged, wfc
>
> I'm trying to create and write to a file in cordova.file.dataDirectory
> (file:///data/data//files/) or cordova.file.cacheDirectory.
> But without success on android 4.4.2 .
> The code fails on :
> or using : 
> fs.root.getFile("myfile.txt", { create: true, exclusive: false }, function () 
> {}, function () {});
> Example of code :
> window.resolveLocalFileSystemURL(cordova.file.dataDirectory,
>   function (directoryEntry) { // success
>   directoryEntry.getFile('myfile.txt', { create: true },
>   function (fileEntry) { //success
>   fileEntry.createWriter(
>   function (fileWriter) { // success
>   fileWriter.onwriteend = 
> function () {
>   console.log("OK");
>   };
>   fileWriter.onerror = function 
> (e) {
>   console.log("Not OK");
>   };
>   // If data object is not passed 
> in,
>   // create a new Blob instead.
>   if (!data) {
>   data = new Blob([' '], 
> { type: 'text/plain' });
>   }
>   data = JSON.stringify(data);
>   var blob = new Blob([data], { 
> type: 'text/plain' });
>   fileWriter.write(blob);
>   },
>   function (e) { // error
>   console.log(e);
>   }
>   );
>   },
>   function (e) { // error
>   console.log(e);
>   }
>   );
>   },
>   function (e) { // error
>   console.log(e);
>   }
> );
> directoryEntry.getFile doesn't work.
> However, it works on Android 6



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11307) Can't create file with cordova.file.dataDirectory or cordova.file.cacheDirectory

2016-05-26 Thread decagon (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301702#comment-15301702
 ] 

decagon commented on CB-11307:
--

Hello Sergey and thank you for your response.

In my case, the piece of code that builds the blob is never reached.

When the code "directoryEntry.getFile ( 'myfile.txt'" is reached, then goes 
directly into the error function (callback).

> Can't create file with cordova.file.dataDirectory or 
> cordova.file.cacheDirectory
> 
>
> Key: CB-11307
> URL: https://issues.apache.org/jira/browse/CB-11307
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: Visual studio 2015 with cordova, Android 4.4.2
>Reporter: decagon
>Assignee: Sergey Shakhnazarov
>  Labels: triaged, wfc
>
> I'm trying to create and write to a file in cordova.file.dataDirectory
> (file:///data/data//files/) or cordova.file.cacheDirectory.
> But without success on android 4.4.2 .
> The code fails on :
> or using : 
> fs.root.getFile("myfile.txt", { create: true, exclusive: false }, function () 
> {}, function () {});
> Example of code :
> window.resolveLocalFileSystemURL(cordova.file.dataDirectory,
>   function (directoryEntry) { // success
>   directoryEntry.getFile('myfile.txt', { create: true },
>   function (fileEntry) { //success
>   fileEntry.createWriter(
>   function (fileWriter) { // success
>   fileWriter.onwriteend = 
> function () {
>   console.log("OK");
>   };
>   fileWriter.onerror = function 
> (e) {
>   console.log("Not OK");
>   };
>   // If data object is not passed 
> in,
>   // create a new Blob instead.
>   if (!data) {
>   data = new Blob([' '], 
> { type: 'text/plain' });
>   }
>   data = JSON.stringify(data);
>   var blob = new Blob([data], { 
> type: 'text/plain' });
>   fileWriter.write(blob);
>   },
>   function (e) { // error
>   console.log(e);
>   }
>   );
>   },
>   function (e) { // error
>   console.log(e);
>   }
>   );
>   },
>   function (e) { // error
>   console.log(e);
>   }
> );
> directoryEntry.getFile doesn't work.
> However, it works on Android 6



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread zhuisui (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301676#comment-15301676
 ] 

zhuisui commented on CB-11305:
--

Thanks very much!
To be honest, I am a beginner to use English, so sometimes cannot understand 
exactly.
I am willing to see you solving this thing.

> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread Sergey Shakhnazarov (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301663#comment-15301663
 ] 

Sergey Shakhnazarov commented on CB-11305:
--

*My Open Issues* is for issues assigned to you.

> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread Sergey Shakhnazarov (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301661#comment-15301661
 ] 

Sergey Shakhnazarov commented on CB-11305:
--

The gist is that you can get the file entry using 
{{cordova.file.applicationDirectory}} + {{getDirectory}}/{{getFile}} and then 
[read its 
contents|https://github.com/apache/cordova-plugin-file-transfer#download-a-binary-file-to-the-application-cache-]
 or use it {{cdvfile}} or native URL with {{fileEntry.toInternalURL()}} or 
{{fileEntry.toURL()}} correspondingly.

The given example with {{toInternalURL()}} will work after applying your patch.

> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread Sergey Shakhnazarov (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301657#comment-15301657
 ] 

Sergey Shakhnazarov edited comment on CB-11305 at 5/26/16 7:13 AM:
---

Markdown analogue for ` is double curly braces {{}}


was (Author: daserge):
Markdown analogue for ` is double qurly braces {{

> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-11305) use cdvfile: cannot import image or js

2016-05-26 Thread Sergey Shakhnazarov (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15301657#comment-15301657
 ] 

Sergey Shakhnazarov commented on CB-11305:
--

Markdown analogue for ` is double qurly braces {{

> use cdvfile: cannot import image or js
> --
>
> Key: CB-11305
> URL: https://issues.apache.org/jira/browse/CB-11305
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 6.2.0
> Environment: cordova 6.6.1
> android 5.1.1
>Reporter: zhuisui
>  Labels: android, reproduced, triaged, wfc
>
> I use cdvfile://localhost/assets/path to show img and import js, and it 
> doesn't work. I haven't seen anything about using with assets, but 
> window.resolveLocalFileSystemURL can handle it to native URL 
> file:///android_asset/path, so I think it should be normal as expected.
> And I didn't test about cdvfile://localhost/temporary|persistent.
> And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org