fix: DATA_URL is improperly prefixed
Platforms affected
All (Android, iOS, OS X, Windows and Browser)
Motivation and Context
When calling navigator.camera.getPicture with destinationType set to Camera.DestinationType.DATA_URL, the success function is called with the base64 encoded data while it should has suitable data URL format on the following form:
data:[<mediatype>][;base64],<data>
It is an old issue in the library and it was previously reported under: https://issues.apache.org/jira/browse/CB-9819
And recently, it was also reported by one of the library users: https://github.com/apache/cordova-plugin-camera/issues/420
Description
I have implemented and tested the DATA_URL fix across all of the Camera plugin supported platforms:
- Android (Java)
- iOS (Objective C)
- OS X (Objective C)
- Browser (JavaScript)
- Windows Platform (JavaScript)
Testing
I manually tested this change across all of these platforms and they work fine.
Checklist
- [x] I've run the tests to see all new and existing tests pass
- [x] Commit is prefixed with
(platform)if this change only applies to one platform (e.g.(android))
Just the snake_case style in Android, otherwise LGTM
I will create a new PR to remove all old snake_case in the Android implementation to be compliant with Java Standards.