【症状】
htmlのaタグで画面遷移した際、startIntentForResultを利用してカメラのインテントを実行すると画面遷移がリセットされてしまう
【再現方法】
・index.html
==============================
<html>
<head>
<script type="text/javascript" src="jsWaffle.js"></script>
</head>
<body><a href="cameraorvideo.html">カメラかビデオのインテント発行</a></body>
</html>
==============================
・cameraorvideo.html
==============================
<html>
<head>
<script type="text/javascript" src="jsWaffle.js"></script>
</head>
<body>
<!-- *** sample *** -->
<h2>Camera/Video</h2>
<div class="buttons">
<button onclick="TestCamera()">Camera</button>
<button onclick="TestVideo()">Video</button>
</div>
<script>
function TestCamera() {
droid.startIntentForResult(
"camera:/sdcard/hoge.jpg",
function(code){
if (code == 0) {
alert("canceled"); return;
}
droid.startIntent("file:///sdcard/hoge.jpg");
});
}
function TestVideo() {
//TODO:not supported
droid.startIntentForResult(
"video:/sdcard/hoge.mpg",
function(code){
if (code == 0) {
alert("canceled"); return;
}
droid.startIntent("file:/sdcard/hoge.mpg");
});
}
</script>
</body>
==============================
【要望】
改善案1:マニュアルにaタグでリンクした際、にこのような現象が起こることを明記する。
改善案2:上記現象が起こらないように修正する。
【バージョン】1.181
【その他】
jsWaffleはすごい便利なので楽しんで利用させていただいています。
これからも、頑張って下さい。