@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.imagebtn:
new Thread() {
URL url;
HttpURLConnection conn = null;
OutputStream os = null;
BufferedReader in = null;
@Override
public void run() {
Looper.prepare();
try {
PreferencesService preferences = new PreferencesService(
getActivity());
String tempURL = preferences
.getPreferences(AllFinalInfo.SMS_IP_PORT_KEY);
// if(tempURL==null || "".equals(tempURL.trim())){
// Toast.makeText(getActivity(), "请设置上传的IP地址和端口!",
// Toast.LENGTH_SHORT).show();
// return;
// }
Toast.makeText(getActivity(), "tempURL:" + tempURL,
Toast.LENGTH_SHORT).show();
url = new URL(AllFinalInfo.SERVER_URL);
for (int i = 0; i < listMsg.size(); i+&#
public void onClick(View v) {
switch (v.getId()) {
case R.id.imagebtn:
new Thread() {
URL url;
HttpURLConnection conn = null;
OutputStream os = null;
BufferedReader in = null;
@Override
public void run() {
Looper.prepare();
try {
PreferencesService preferences = new PreferencesService(
getActivity());
String tempURL = preferences
.getPreferences(AllFinalInfo.SMS_IP_PORT_KEY);
// if(tempURL==null || "".equals(tempURL.trim())){
// Toast.makeText(getActivity(), "请设置上传的IP地址和端口!",
// Toast.LENGTH_SHORT).show();
// return;
// }
Toast.makeText(getActivity(), "tempURL:" + tempURL,
Toast.LENGTH_SHORT).show();
url = new URL(AllFinalInfo.SERVER_URL);
for (int i = 0; i < listMsg.size(); i+&#