아이스크림샌드위치 및 젤리빈에서 앱이 다운되는 현상이 있습니다. 왜일까요?

55 views
Skip to first unread message

Chris

unread,
Nov 22, 2012, 10:32:25 PM11/22/12
to appspr...@googlegroups.com
안녕하십니까? 앱스프레소 개발자님들

앱스프레소 개발 쉽게 접근 했다가 리소스에 대한 문제 와 기기별로 다른 특성을 타는것 같아 참 고민이 많이 됩니다.

이번 프로젝트를 진행중인데

시뮬레이터에서는 아주 잘 돌아갑니다.(물론 안드로이드 애뮬에서는 느리지만요)

장비1 / 갤럭시K (2.3.6)  : 특정 페이지에서 앱 다운이 되는 현상은 없으나, Select 클릭시 value는 변하고 text는 안 변함.
장비2 / 캘럭시 노트 (4.0) : 특정페이지에서 앱 다운 됨.
장비3 / 캘럭시 노트 (4.1.1) : 특정페이지에서 앱 다운 됨.

전체 안드로이드 장비를 다 사서 테스트 할 수도 없고 기기마다 이런 현상이 생긴다면 참 문젭니다.

혹시나 같은 현상때문에 고민하고 계신분 있으시면 정보 공유 바랍니다.

iolo

unread,
Nov 22, 2012, 11:22:06 PM11/22/12
to appspr...@googlegroups.com
1. value는 변하고 text는 안변함...이라는 현상은 어떤건지 좀 더 구체적으로 설명해주시면 좋겠습니다.
2. 특정페이지에서 앱다운되는 증상은 해당 페이지의 소스를 보지 않고는 알기가 어렵네요.

말씀하셨다시피 안드로이드에서는 단말과 버전에 따라 다양한 현상들이 발생합니다.

앱스프레소로 만든 앱이 단말에 따라 다른 동작을 보이면,
먼저 해당 페이지를 일반적인 웹서버에 올려놓고(device api 부분은 적절히 workaround처리하고)
안드로이드의 기본 웹브라우져로 열어서
어떻게 보이는 지를 확인해보시기바랍니다.



2012년 11월 23일 금요일 오후 12시 32분 25초 UTC+9, Chris 님의 말:

Chris

unread,
Nov 23, 2012, 12:26:44 AM11/23/12
to appspr...@googlegroups.com

먼저 관심을 가져주셔서 감사합니다.

1. value는 변하고 text는 안변함.

만약에 아래의 소스가 있다면 먼저 1일 디폴트로 선택이 되었고, 기기에서 이값을 2로 바꾸었다면 UI에는 1로 그대로 남아 있고 실행되는 결과를 보면 2로 동작을 했다는 이야기입니다.

 <select >

     <option value="1">1</option>

    <option value="2">2</option>         

 </select>

2. 다운되는 부분에 대한 소스 부분입니다. 

============================

var pri_val = "", html = "", fr_html = "";

for(var i = 1; i < 11; i++) { pri_val += "<option value='" + i + "'>" + i + "</option>"; }

// DOM 초기화 

$("#cbi_List > tbody").html("");


for (var i = 0; i < 11; i++) { 

fr_html +=  "<tr>" +

"<td rowspan=\"2\" style=\"background:#90B4C5;text_align:center;\">";

if(i == 0){

fr_html +=  "<input type=\"checkbox\" name=\"chkBundle\" checked disabled>";

} else {

fr_html +=  "<input type=\"checkbox\" name=\"chkBundle\">";

}

fr_html += "</td>" +

"<td><input type=\"text\" name=\"bundleContNo\"></td>" +

"<td><input type=\"text\" name=\"bundleContIso\"></td>";

if(i == 0){

fr_html += "<td><select name=\"priority\" style=\"width:100%;\">" + pri_val + "</select></td>";

} else {

fr_html += "<td><select name=\"priority\" style=\"width:100%;\"><option value=''></option>" + pri_val + "</select></td>";

}

fr_html += "</tr>" +

"<tr>" +

"<td>Postup<input type=\"checkbox\" name=\"chkFRStand\"></td>" +

"<td>Fix<input type=\"checkbox\" name=\"chkFRStandFix\"></td>" +

"<td>";

if(GateInMode == "GateIn"){

fr_html += "<section class=\"button\">" +

"<input name=\"btnDMG\" type=\"button\" value=\"DMG\" onclick=\"GateContainerBuildingIn.DamageEdit()\" />" +

"</section>";

}


fr_html += "</td>" +

"</tr>" +

"<tr><td colspan=\"4\" style=\"height:1px;\"></td></tr>";

}

$("#cbi_List > tbody").html(fr_html);

if(GateInMode == "GateIn"){

ContIdx = parseInt($("#inspectionIndex").val());

$("input[name='btnDMG']").first().attr("disabled", "disabled");


} else {

$("input[name='btnDMG']").addClass("hide");

}

$("[name='bundleContNo']:eq(0)").val($("[name='etgPreContNo']:eq(" + ContIdx + ")").val());

$("[name='bundleContIso']:eq(0)").val($("[name='etgPreIso']:eq(" + ContIdx + ")").val());

if(ContIdx == 0){

for(var i = 1; i < bundleNoArry1.length + 1; i++){

bundleInfo = bundleNoArry1[i-1].split("/");

$("[name='bundleContNo']:eq(" + i + ")").val(bundleInfo[0]);

$("[name='bundleContIso']:eq(" + i + ")").val(bundleContIsoArry1[i-1]);

        for (var j = 0; j < $("[name='priority']:eq(" + i + ") option").length; j++) {

            if (document.getElementsByName("priority")[i].options[j].value == bundlePriorityArry1[i-1]) {

                document.getElementsByName("priority")[i].options[j].selected = true;

                break;

            }

        }

       

        if(bundleChkArry1[i-1] == "Y") {

        $("[name='chkBundle']:eq(" + i + ")").attr("checked", true);

        } else {

        $("[name='chkBundle']:eq(" + i + ")").attr("checked", false);

        }

       

        if(bundleContFRStandArry1[i-1] == "Y") {

        $("[name='chkFRStand']:eq(" + i + ")").attr("checked", true);

        } else {

        $("[name='chkFRStand']:eq(" + i + ")").attr("checked", false);

        }

       

        if(bundleContFRStandFixArry1[i-1] == "Y") {

        $("[name='chkFRStandFix']:eq(" + i + ")").attr("checked", true);

        } else {

        $("[name='chkFRStandFix']:eq(" + i + ")").attr("checked", false);

        }

}

} else {

for(var i = 1; i < bundleNoArry2.length + 1; i++){

bundleInfo = bundleNoArry2[i-1].split("/");

$("[name='bundleContNo']:eq(" + i + ")").val(bundleInfo[0]);

$("[name='bundleContIso']:eq(" + i + ")").val(bundleContIsoArry2[i-1]);

        for (var j = 0; j < $("[name='priority']:eq(" + i + ")").length; j++) {

            if (document.getElementsByName("priority")[i].options[j].value == bundlePriorityArry2[i-1]) {

                document.getElementsByName("priority")[i].options[j].selected = true;

                break;

            }

        }

       

        if(bundleChkArry2[i-1] == "Y") {

        $("[name='chkBundle']:eq(" + i + ")").attr("checked", true);

        } else {

        $("[name='chkBundle']:eq(" + i + ")").attr("checked", false);

        }

       

        if(bundleContFRStandArry2[i-1] == "Y") {

        $("[name='chkFRStand']:eq(" + i + ")").attr("checked", true);

        } else {

        $("[name='chkFRStand']:eq(" + i + ")").attr("checked", false);

        }

       

        if(bundleContFRStandFixArry2[i-1] == "Y") {

        $("[name='chkFRStandFix']:eq(" + i + ")").attr("checked", true);

        } else {

        $("[name='chkFRStandFix']:eq(" + i + ")").attr("checked", false);

        }

}

}

if($("#gateIoMode").val() == "I"){

$("#GCB_Save").removeClass("hide");

} else {

$("#GCB_Save").addClass("hide");

}

==========================

2012년 11월 23일 금요일 오후 1시 22분 7초 UTC+9, iolo 님의 말:

iolo

unread,
Nov 26, 2012, 3:26:28 AM11/26/12
to appspr...@googlegroups.com
1.
갤럭시K 단말을 입수할 수 없어서... 확인은 못했고.. 그냥 소발로 쥐잡는 심정으로...
중간에 보면 select box의 선택 값을 option.selected로 설정하신거 같은데...
select.selectedIndex를 설정해보시길...
예컨데... 이 부분은:
                document.getElementsByName("priority")[i].options[j].selected = true;
이런 식이 되겠네요.
                document.getElementsByName('priority')[i].selectedIndex = j;
더욱 간단하게 쓸수도 있겠지만... 있던 코드를 최대한 손을 안대고 고치려면 이정도인 듯 하네요.

2. 올려주신 코드를 검토해보았습니다만. 앱스프레소와 직간접적으로 연관된 부분은 찾지 못했습니다.
다만 jquery의 확장 셀렉터를 많이 사용하셨는데... 무한루프 같은 것이 발생할 가능성도 있을 듯 합니다.

전체가 아닌 일부만 보고 말씀드리는 것이라...
꼭집어서 뭐라 말씀드리긴 어렵습니다만,
앱스프레소의 버그는 아니라고 판단됩니다.
도움이 못되서 죄송합니다.

2012년 11월 23일 금요일 오후 2시 26분 44초 UTC+9, Chris 님의 말:
Reply all
Reply to author
Forward
0 new messages