<span style=
"font-size:24px;"
>노란부분이 실행이 안됩니다 매니패스터 minSdkVersion=
"11"
만변경하면 잘되는데요 누가좀 알려주세요 ㅠㅠ</span>
runOnUiThread(
new
Runnable() {
public
void
run() {
nick= edtname.getText().toString();
String life=
"1"
;
try
{
if
(a==
0
){
String b=
"1"
;
URL url =
new
URL(SERVER_ADDRESS +
"/insert.php?"
+
"nick="
+ URLEncoder.encode(nick,
"UTF-8"
)
+
"&life="
+ URLEncoder.encode(life,
"UTF-8"
)
+
"&team="
+ URLEncoder.encode(b,
"UTF-8"
));
Toast.makeText(new_activity.
this
,
"하기전"
, Toast.LENGTH_SHORT).show();
url.openStream();
Toast.makeText(new_activity.
this
,
"하고후"
, Toast.LENGTH_SHORT).show();
}
else
if
(a==
1
)
{
String b=
"0"
;
URL url =
new
URL(SERVER_ADDRESS +
"/insert.php?"
+
"nick="
+ URLEncoder.encode(nick,
"UTF-8"
)
+
"&life="
+ URLEncoder.encode(life,
"UTF-8"
)
+
"&team="
+ URLEncoder.encode(b,
"UTF-8"
));
Toast.makeText(new_activity.
this
,
"하기전"
, Toast.LENGTH_SHORT).show();
url.openStream();
Toast.makeText(new_activity.
this
,
"하고후"
, Toast.LENGTH_SHORT).show();
}
String result = getXmlData(
"insertresult.xml"
,
"result"
);
if
(result.equals(
"1"
)) {
Toast.makeText(new_activity.
this
,
"DB insert 성공"
, Toast.LENGTH_SHORT).show();
edtname.setText(
""
);
}
else
Toast.makeText(new_activity.
this
,
"DB insert 실패"
, Toast.LENGTH_SHORT).show();
}
catch
(Exception e) {
String str=
"1"
;
Log.e(
""
,
" "
+ str);
}