[GitHub] cordova-plugin-camera issue #197: [CB-5195][CB-4078]: correctOrientation not...

2016-08-28 Thread swbradshaw
Github user swbradshaw commented on the issue:

https://github.com/apache/cordova-plugin-camera/pull/197
  
@stevengill Man, I'm such an amateur.  Removed.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera issue #197: [CB-5195][CB-4078]: correctOrientation not...

2016-08-27 Thread swbradshaw
Github user swbradshaw commented on the issue:

https://github.com/apache/cordova-plugin-camera/pull/197
  
@stevengill - I think this is good to go. My first PR/rebase, hopefully 
didn't messed it up!

-Rebased from master
-Verified rotation is working correctly after merge conflict resolved
-Tested fed987 / CB-11447 to make sure it works w/merge conflict resolved
-A side-effect of getting rotation/scaling working, is this PR allows the 
user to choose picture from any Document Provider now (including Google Drive), 
provided the appropriate calling options are set (scale || rotate || base64 
output). 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera issue #197: [CB-5195][CB-4078]: correctOrientation not...

2016-08-26 Thread swbradshaw
Github user swbradshaw commented on the issue:

https://github.com/apache/cordova-plugin-camera/pull/197
  
@stevengill ill take a look this weekend. This is my first PR/rebase so 
I've got some homework to do


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera issue #170: Fix FileHelper / port cordova-plugin-filep...

2016-08-24 Thread swbradshaw
Github user swbradshaw commented on the issue:

https://github.com/apache/cordova-plugin-camera/pull/170
  
Someone needs to take a look at all the open camera PR.  There are many 
problems with this getRealPath and it has been discussed in a few places. It 
seems like this PR helps out a lot. For what its worth I removed the need for 
this function in  #197 for most cases.  (#197 also allows user to pick a photo 
from Google Drive.)  



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera issue #197: [CB-5195][CB-4078]: correctOrientation not...

2016-06-20 Thread swbradshaw
Github user swbradshaw commented on the issue:

https://github.com/apache/cordova-plugin-camera/pull/197
  
@riknoll Have you had a chance to test these changes?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: [CB-5195][CB-4078]: correctOri...

2016-05-12 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-218930850
  
@riknoll I just removed a big chunk of the whitespace changes that were 
done by Android Studio. I find myself having to manually copy changes from my 
editor into a seperate text editor to commit, because there are so many 
indentation problems in this file. :-(  This is what led to the missing 
function earlier today.
I will need to do another pull request in the future to specifically to 
address indentation, spelling errors, and function documentation that is wrong. 
I was trying to fix so much. Sorry!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: [CB-5195][CB-4078]: correctOri...

2016-05-12 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-218847324
  
@JEGardner Well, that's embarrassing. Check it out now and it should work 
for you. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: [CB-10388] - Added correctOrie...

2016-04-27 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/158#issuecomment-215291931
  
@morioma  - Take a look at #197 again. I completely rewrote the 
implementation. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-04-27 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-215290093
  
Re-opening with cleaned up fork. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-04-27 Thread swbradshaw
GitHub user swbradshaw reopened a pull request:

https://github.com/apache/cordova-plugin-camera/pull/197

CB-4078: correctOrientation not working on camera.getPicture for 
PHOTOLIBRARY

This fixes the orientation bug for Android 4.4+ devices when choosing a 
picture from the photo library.

This fixes both DATA_URL and FILE_URI requests.

Tested on Android 4.0.4,  Android 5.02, and Android 5.1 devices.






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

$ git pull https://github.com/swbradshaw/cordova-plugin-camera master

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

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


commit f2b4eeded069d791aec0670b369bab8fb3bfd0eb
Author: swbradshaw <swbrads...@gmail.com>
Date:   2016-04-28T02:27:37Z

CB-4078: Fix for orientation/scaling on Android 4.4+ devices

The only way to get rotation for photos in library (Gallery, File
System, Google Drive,etc) is to first create a temporary file from the
provider. Only then can we determine the orientation and scale the
bitmap correctly. By doing it in a central place, it eliminates reading
the inputstream repetitively in the plugin.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-04-27 Thread swbradshaw
Github user swbradshaw closed the pull request at:

https://github.com/apache/cordova-plugin-camera/pull/197


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-04-27 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-215287391
  
@unbeatableDeepak My changes have been committed. I did a rebase from the 
master since I was weeks behind. Since this is my first PR, I'm not sure if 
that was correct or not. Anyway, you can test now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-04-04 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-205285417
  
@unbeatableDeepak I have a solution coded, but I haven't had a chance to 
test it yet. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-03-31 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-203968527
  
@unbeatableDeepak I was able to reproduce your issues. I'll take a look to 
see how I can fix this.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-03-31 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-203919964
  
@unbeatableDeepak Thanks. I was referring to your JS code. I would like to 
reproduce what you are seeing on my side with the same options you are calling 
to the plugin.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-03-31 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-203886789
  
@unbeatableDeepak please see this pull request:
https://github.com/apache/cordova-plugin-camera/pull/194

Can you please provide the code you are using? Internal storage should work.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-03-31 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-203883218
  
@unbeatableDeepak Grab the changes in CB-10460 as well and that should fix 
your issue. Please verify.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-03-25 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-201611674
  
@riknoll - I found the changes you were talking about. The changes in 
CB-10460 will make the `ouputModifiedBitmap()` function correctly because the 
FileHelper will now return null, which is what it was expecting.  There are no 
further changes on my side needed. With this change and CB-10460 combined, I 
can now pick photos from any Document Provider (Drive, Gallery, Photos, 
QuickPic) and it will successfully correct the orientation and resize the photo.

One suggestion I have is to rename CB-10460 to something like "Choosing 
pictures from 3rd party provider (Gallery, Photo, Drive) will result in error". 
  If the current title is published on the blog, users aren't going to know 
what "getRealPath return null in some cases" means. :-)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-03-25 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-201567303
  
Should I go ahead and fix `ouputModifiedBitmap()` for this pull request?  
The reality is now that orientation is fixed, this is going to cause that 
function to get called more because the image will need to be rotated for 
output. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-03-25 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-201565769
  
`ouputModifiedBitmap()` is not fixed in master. 
`getRealPathFromURI_API19()` in FileHelper returns an empty string and thus the 
fileName cannot be generated for the temp file. I just tested this 5 minutes 
ago.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-03-25 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-201534121
  
@riknoll - Can you clarify? 

Are you referring to the apps that have implement the DocumentsProvider 
interface that show up on the unified UI picker on 4.4+ devices?   If so, I 
tested the default picker provided by Android. If you try to test another 3rd 
party one, it doesn't work. This doesn't work in the master branch, either. 
This is due to a bug with the "ouputModifiedBitmap"  function where it won't 
correctly generate a filename when the user picks a path that comes back from a 
3rd party URI returned by Android's DocumentProvider. This push request isn't 
addressing that issue, but I can certainly fix that one as well if its been 
logged.  (The spelling error in that function name is driving me crazy, too).

OR are you referring to pre-4.4 devices that prompt the user to pick an app 
to choose an image from?  If this is the case, the code should handle these the 
same way it has done in the past.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-03-24 Thread swbradshaw
Github user swbradshaw commented on the pull request:


https://github.com/apache/cordova-plugin-camera/pull/197#issuecomment-200913136
  
I personally saw the issue on on LG G2(5.0.2) and LG V10 (5.1).  

I believe it affects all devices running Android 4.4 and newer because the 
existing code won't correctly pull the orientation from the MediaStore on API19+



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-camera pull request: CB-4078: correctOrientation no...

2016-03-23 Thread swbradshaw
GitHub user swbradshaw opened a pull request:

https://github.com/apache/cordova-plugin-camera/pull/197

CB-4078: correctOrientation not working on camera.getPicture for 
PHOTOLIBRARY

This fixes the orientation bug for Android 4.4+ devices when choosing a 
picture from the photo library.

This fixes both DATA_URL and FILE_URI requests.

Tested on Android 4.0.4,  Android 5.02, and Android 5.1 devices.






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

$ git pull https://github.com/swbradshaw/cordova-plugin-camera master

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

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


commit c0e9210b56ece1b239261f91e11569aba9d696fa
Author: swbradshaw <swbrads...@gmail.com>
Date:   2016-03-24T00:15:10Z

Fix for image rotation on Android 4.4+ devices




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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