This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
iOS & Windows: a collection of some different extensions and a few tiny bug-fixes / memory leaks #97
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 5c450fe.
While setting up the capture session the check, if a video capture device was successfully obtained, was wrong placed in the else branch for the back camera, when it also should be done for the if branch (front camera). Also matched one "if(!) {return…}" with all other "if() {} else {return…}".
1) The "Cancel" button maybe would be placed more standard to the left not center (take a look at the same button in the camera-plugin); also such will be a (again more suitable) place for the coming flash toggle. 2) The button for flipping cameras has the wrong icon (again: take a look at the camera plugin); the new icon is taken from the icons8.com collection, which should be free for Open Source, else take a look at the accompanying license).
This reverts commit 0b46cd7672e96c962bb56221bb78d124d62ebda0.
1) The "Cancel" button maybe would be placed more standard to the left not center (take a look at the same button in the camera-plugin); also such will be a (again more suitable) place for the coming flash toggle. 2) The button for flipping cameras has the wrong icon (again: take a look at the camera plugin); the new icon is taken from the icons8.com collection, which should be free for Open Source, else take a look at the accompanying license).
For devices that have a flash with the – at the moment used – camera, there is a new button in the center of the toolbar, that lets the user toggle it on or off; the icon changes accordingly. (The icons are taken from the icons8.com collection, which should be free for Open Source, else take a look at the accompanying license.)
Besides the already existing argument 0, there are now two new arguments to change the standard coloring of the toolbar: argument 1 will change it from white with blue buttons to black with white buttons, argument 2 will change it from opaque to translucent (setting alpha to 0.7); both new arguments default to false (to stay downwards compatible).
user interface also possible (if app allows) in landscape view, rotatable; starting in the current orientation (no "preferred" default orientation); barcode recognition also (of course) now works in landscape.
to take advantage of landscape, a wider area will be recognized – and of course marked with that green box and red line accordingly, so that longer one-dimensional barcodes can be held nearer an so will be recognized better.
to 4.0.2.1
as they are iOS only and won’t be set at run-time.
14d6 3e35ac9d1333f178cb3ae95a88b530d73538 set the explicit compiler directive for non-ARC – but ccfb 1a2fee446847c7b78879d6d4abb9c2c6a1e2 removed all "autorelease" statements (and one "[super dealloc]" – unfortunately not all three), producing some fifteen "potential leak"s and such. With some more non-ARC code added afterwards (in 8b10 b8ae33fb672018fa9230079d8c6f096c4b13 and f04a 2a0e4c8bc9c09d76a725ee771423e042837e). One independently left "potential leak" with assigning the beep-sound also eliminated.
Since commit 9d18 4d509b2596a5d71ea8af8b600e4555660386 the plugin always supported all possible orientations of the calling App. Now these can be overridden, e.g., if the App only supports Portrait, the scanner could nonetheless also support landscape (for better recognition of long one-dimensional codes). The orientation-dependent setting of the view- and preview-layer-frames was a) wrong placed in loadView (here the orientation is still that of the parent) instead of viewWillAppear; and b) wrongly simply took the parent-view’s frame (in it’s orientation) – instead of explicitly realign it to a possibly other orientation.
i.e. white on black
caused by "Smart-Qoute" functionality of the spell-checker.
to avoid conflicts when requesting the pull.
convey-mane
changed the title
a collection of some different extensions and a few tiny big-fixes / memory leaks
iOS: a collection of some different extensions and a few tiny big-fixes / memory leaks
Oct 30, 2015
convey-mane
changed the title
iOS: a collection of some different extensions and a few tiny big-fixes / memory leaks
iOS: a collection of some different extensions and a few tiny bug-fixes / memory leaks
Oct 30, 2015
Enumerate available video devices and take first back panel video device as media source now
A function call of upcoming device rotation handling was copied into current source file accidentally.
Now correct rotation angle is calculated and handled on orienation change. Since "orientationchange" event is not working, polling for changes is implemented for the time being.
This was referenced Nov 16, 2015
Closed
convey-mane
changed the title
iOS: a collection of some different extensions and a few tiny bug-fixes / memory leaks
iOS & Windows: a collection of some different extensions and a few tiny bug-fixes / memory leaks
Dec 4, 2015
Ted-CAcert
force-pushed
the
master
branch
3 times, most recently
from
December 10, 2015 14:28
b63624f
to
bdbc056
Compare
vladimir-kotikov
added a commit
that referenced
this pull request
Dec 23, 2015
@convey-mane, @convey-gilbert, FYI, orientation change support for Windows was added in 51216ff |
asainz
pushed a commit
to asainz/phonegap-plugin-barcodescanner
that referenced
this pull request
Jan 4, 2016
…barcodescanner * 'master' of https://github.com/phonegap/phonegap-plugin-barcodescanner: Refactor windows implementation in promise manner Add support for orientation change from phonegap#62 and phonegap#97 Resolve merge conflicts and address feedback for phonegap#62 fixing issues for windows platform Correct scan result to expose format name instead of format code. Add information about windows 10 support to README Removes intermediate winmd component from Win10 implementation Add Windows 10 Support Improve native look and feel for windows platform Rework autofocus logic for windows. This fixes phonegap#41 comments added data type check, and uri prepending for encode method error checking, data validation qrcode encode working encode method or blackberry
Has the flashlight/torch toggle been added? Its a very useful feature to have for scanning in dark situations. |
will this get merged? |
Wonderful! When this is going to release for iOS? |
Sorry, never mind, I mis-understood the comment. The feature is already there for iOS. |
Any news on when this pull request will be merged? |
This can't be merged as is, would need a major refactor as the plugin has changed a lot since the PR was sent, so I will close it. |
This thread has been automatically locked. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In our project we needed many (well, OK, some) extensions. I did commit one at a time, giving each a descriptive title and a hopefully sufficient comment, so you could check each on it's own (is this OK for you?). Where necessary things are parametrizable via new preferences, which is also documented in the README.md.
I know, that @wildabeast also worked on that landscape topic (wildabeast/BarcodeScanner@7226982 and wildabeast/BarcodeScanner@d33ba13), I even took some ideas from him – but did do some other things different (on one I already commented: wildabeast/BarcodeScanner@d33ba13#comments) and imho, well, better(?). On the other hand I also implemented it compile-time configurable, as he suggested, even if we don't need that ourselves.
It would also be a resolution for #40 (landscape overall and especially that thing with that ugly black bar resulting from different orientations between the calling App and the plugin itself).
The thing with the flash/torch is also something, others already are longing for (#36 and #10).
And as I was already in it, I even implemented another thing, we probably won't need, but someone else requested (and did not fully implement it himself): #88 – inverse QR-codes.
Hoping you like our extensions!
P.S.: Sorry for