얼마전 제 폰을 프로요에서 진저브레드로 업그레이드 시켰습니다

 

그런데 문제는 프로요용으로 만든 제 어플이

 

진저에서 몇가지 안되는 문제가 발견되었다는 것입니다

 

기능 중에 php 파일을 실행시켜 서버에 있는 db를 다루는 것이 있는데

 

post방식으로 키워드 값들을 받아서 php를 이용해 쿼리로 db쪽에 접근하는 모든 곳에 문제가 있는 듯 보입니다

 

확인결과 프로요 폰들은 같은 소스에서도 여전히 정상 작동하는데 진저브레드만 문제가 나오네요

 

혹시나해서 프로젝트를 진저브레드로 바꿔서 실행시켜봤는데 여전히 같은 문제가 나옵니다

 

진저에서 api가 변경되서 다른 걸 써야 하는건지 궁금합니다 ;;

 

문제가 있는 곳 중 한 부분의 소스를 보여드리겠습니다

 

db가 변경조차 되지 않습니다 ㅜ

 

public void saveTimeSet(String startTime, String endTime) throws Exception {
  StringBuffer postDataBuilder = new StringBuffer();
        postDataBuilder.append("start_time=" + startTime);
        postDataBuilder.append("&end_time=" + endTime); 
        postDataBuilder.append("&phone=" + phone);
        System.out.println("phone: " + phone);
        byte[] postData = postDataBuilder.toString().getBytes("UTF-8");
  
        String addr = "http://서버ip/time_set.php";  
        URL url = new URL("addr);
        HttpURLConnection conn = (HttpURLConnection)url.openConnection();
  
       conn.setDefaultUseCaches(false);
       conn.setDoInput(true);
       conn.setDoOutput(true);
       conn.setRequestMethod("POST");
       conn.setRequestProperty("content-type", "application/x-www-form-urlencoded");
       conn.setRequestProperty("Content-Length", Integer.toString(postData.length));
       
        OutputStream out = conn.getOutputStream();
        out.write(postData);
        out.close();
 }