Titanium SDK の openCamera 関数を使用して画像をキャプチャし、SD カードに保存しています。
function captureImage() {
var capturedImg;
Titanium.Media.showCamera({
success : function(event) {
/* Holds the captured image */
capturedImg = event.media;
/* Condition to check the selected media */
if (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {
var window1 = Project.AddDocumentSaveView.init(capturedImg, docImgModel);
window1.oldWindow = win;
Project.UI.Common.CommonViews.addWindowToTabGroup(window1);
activityInd.hide();
}
},
cancel : function() {
},
error : function(error) {
/* called when there's an error */
var a = Titanium.UI.createAlertDialog({
titleid : Project.StringConstant.IMP_DOCS_CAMERA
});
if (error.code == Titanium.Media.NO_CAMERA) {
a.setMessage(Project.StringConstant.IMP_DOCS_ERROR_WITH_CAMERA);
} else {
a.setMessage(Project.StringConstant.UNEXPECTED_ERROR + error.message);
}
a.show();
}
});
}
iphoneやsamsung galaxy s2でも問題なく動作します。しかし、1 つのデバイス、Motorola Milestone デバイスでは、キャプチャ後に画像が受け入れられると、アプリケーションがクラッシュします。
デバイスが接続されていたときのログは次のとおりです。 カメラ クラッシュのログ
何度も試しましたが、問題が見つかりませんでした。メモリの問題だと思いますが、よくわかりません。
誰かがそれを調べて、問題が何であるかを見つけるのを手伝ってくれませんか.
ヘルプ/提案をいただければ幸いです。
ありがとう