Phonegap android camera: crash when setting the "correctOrientation" option

I know that people have asked similar questions, but I have a serious problem.

anyone who uses the difference in the phone knows that this is definitely not the end of all app solutions!

but here is my code:

navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50, destinationType: destinationType.FILE_URI, correctOrientation: true }); 

The problem is that when I add the correct Orientation, my freaking application has some memory leak because it closes and has an error. When I take out the correct orientation parameter, its fine, except that the orientation is wrong! Does anyone have a job to get the correct orientations of my photos?

 <?xml version="1.0" encoding="utf-8"?> 

  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 

->

 <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.RECEIVE_SMS" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.RECORD_VIDEO"/> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.WRITE_CONTACTS" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.BROADCAST_STICKY" /> <application android:icon="@drawable/icon" android:label="@string/app_name" android:hardwareAccelerated="true" android:debuggable="true"> <activity android:name="mysecond" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/> 

+4
source share
2 answers

Thanks guys, I figured it out. You must set the "target size" if the img size is not HUGE and will cause a memory overflow. I set the goal width to 720 and the quality to 50, and everything was fine,

+6
source

Are you using the Phonegap Hydration app - I'm not 100% sure, but that seems to have broken the camera app several times. Removing seems to have helped. I also tried adding targetWidth: 400 and turned hydration back on, which seems to work too.

0
source

All Articles