You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Amy Johnson (JIRA)" <ji...@apache.org> on 2016/09/07 14:45:20 UTC
[jira] [Updated] (CB-11812) Apache Cordova-plugin-camera working
only about 1/3 of time & very slow on iPhones 4s & 5c
[ https://issues.apache.org/jira/browse/CB-11812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amy Johnson updated CB-11812:
-----------------------------
Description:
Cordova app has cordova-plugin-camera . When called from app on iPhone 4s or 5c, only works about 1/3 of the time. Even then, takes 5-6 seconds to respond.
This is original javascript code:
var onDeviceReady;
onDeviceReady = function() {
console.log(navigator.camera);
};
document.addEventListener('deviceready', onDeviceReady, false);
exports.takePicture = function(success, error) {
if (!navigator.camera) {
error();
return;
}
console.log("About to take picture");
return navigator.camera.getPicture(success, error, {
quality: 80,
destinationType: Camera.DestinationType.FILE_URI
});
};
exports.hasCamera = function() {
return navigator.camera != null;
};
And here is the Xcode Log:
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-09-06 07:55:45.810 Explorer[1434:579426] Passed in type public.item doesn't conform to either public.content or public.data. If you are exporting a new type, please ensure that it conforms to an appropriate parent type.
2016-09-06 07:55:45.849 Explorer[1434:579426] the behavior of the UICollectionViewFlowLayout is not defined because:
2016-09-06 07:55:45.850 Explorer[1434:579426] the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.
2016-09-06 07:55:45.850 Explorer[1434:579426] The relevant UICollectionViewFlowLayout instance is <_UIAlertControllerCollectionViewFlowLayout: 0x16110c410>, and it is attached to <UICollectionView: 0x16091ea00; frame = (0 44; 10 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x1611abf50>; animations = { bounds.origin=<CASpringAnimation: 0x15fdc0760>; bounds.size=<CASpringAnimation: 0x15fdc07c0>; position=<CASpringAnimation: 0x161274ed0>; }; layer = <CALayer: 0x161166a70>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <_UIAlertControllerCollectionViewFlowLayout: 0x16110c410>.
2016-09-06 07:55:45.851 Explorer[1434:579426] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
2016-09-06 07:55:46.053 Explorer[1434:579426] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x15fef2170 UILabel:0x161376280.width == UIView:0x161312260.width - 32>",
"<NSLayoutConstraint:0x161110930 UIView:0x161312260.width == UIView:0x1613700a0.width>",
"<NSLayoutConstraint:0x1613a2220 H:[UIView:0x1613700a0(30)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x15fef2170 UILabel:0x161376280.width == UIView:0x161312260.width - 32>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
was:
Cordova app has cordova-plugin-camera . When called from app on iPhone 4s or 5c, only works about 1/3 of the time. Even then, takes 5-6 seconds to respond.
This is original javascript code:
var onDeviceReady;
onDeviceReady = function() {
console.log(navigator.camera);
};
document.addEventListener('deviceready', onDeviceReady, false);
exports.takePicture = function(success, error) {
if (!navigator.camera) {
error();
return;
}
console.log("About to take picture");
return navigator.camera.getPicture(success, error, {
quality: 80,
destinationType: Camera.DestinationType.FILE_URI
});
};
exports.hasCamera = function() {
return navigator.camera != null;
};
> Apache Cordova-plugin-camera working only about 1/3 of time & very slow on iPhones 4s & 5c
> ------------------------------------------------------------------------------------------
>
> Key: CB-11812
> URL: https://issues.apache.org/jira/browse/CB-11812
> Project: Apache Cordova
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the default.)
> Components: iOS, Plugin Camera
> Environment: iPhone 4s, 5c
> Reporter: Amy Johnson
> Priority: Critical
> Labels: newbie
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Cordova app has cordova-plugin-camera . When called from app on iPhone 4s or 5c, only works about 1/3 of the time. Even then, takes 5-6 seconds to respond.
> This is original javascript code:
> var onDeviceReady;
> onDeviceReady = function() {
> console.log(navigator.camera);
> };
> document.addEventListener('deviceready', onDeviceReady, false);
> exports.takePicture = function(success, error) {
> if (!navigator.camera) {
> error();
> return;
> }
> console.log("About to take picture");
> return navigator.camera.getPicture(success, error, {
> quality: 80,
> destinationType: Camera.DestinationType.FILE_URI
> });
> };
> exports.hasCamera = function() {
> return navigator.camera != null;
> };
> And here is the Xcode Log:
> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
> The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
> 2016-09-06 07:55:45.810 Explorer[1434:579426] Passed in type public.item doesn't conform to either public.content or public.data. If you are exporting a new type, please ensure that it conforms to an appropriate parent type.
> 2016-09-06 07:55:45.849 Explorer[1434:579426] the behavior of the UICollectionViewFlowLayout is not defined because:
> 2016-09-06 07:55:45.850 Explorer[1434:579426] the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.
> 2016-09-06 07:55:45.850 Explorer[1434:579426] The relevant UICollectionViewFlowLayout instance is <_UIAlertControllerCollectionViewFlowLayout: 0x16110c410>, and it is attached to <UICollectionView: 0x16091ea00; frame = (0 44; 10 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x1611abf50>; animations = { bounds.origin=<CASpringAnimation: 0x15fdc0760>; bounds.size=<CASpringAnimation: 0x15fdc07c0>; position=<CASpringAnimation: 0x161274ed0>; }; layer = <CALayer: 0x161166a70>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <_UIAlertControllerCollectionViewFlowLayout: 0x16110c410>.
> 2016-09-06 07:55:45.851 Explorer[1434:579426] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
> 2016-09-06 07:55:46.053 Explorer[1434:579426] Unable to simultaneously satisfy constraints.
> Probably at least one of the constraints in the following list is one you don't want.
> Try this:
> (1) look at each constraint and try to figure out which you don't expect;
> (2) find the code that added the unwanted constraint or constraints and fix it.
> (
> "<NSLayoutConstraint:0x15fef2170 UILabel:0x161376280.width == UIView:0x161312260.width - 32>",
> "<NSLayoutConstraint:0x161110930 UIView:0x161312260.width == UIView:0x1613700a0.width>",
> "<NSLayoutConstraint:0x1613a2220 H:[UIView:0x1613700a0(30)]>"
> )
> Will attempt to recover by breaking constraint
> <NSLayoutConstraint:0x15fef2170 UILabel:0x161376280.width == UIView:0x161312260.width - 32>
> Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
> The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org