Click here to Skip to main content
15,912,400 members
Home / Discussions / Java
   

Java

 
AnswerRe: Dear Develepoer Pin
jschell12-Aug-13 8:20
jschell12-Aug-13 8:20 
QuestionWhat is difference between debug,deploy,build and run in java Pin
Member 102007689-Aug-13 20:16
Member 102007689-Aug-13 20:16 
AnswerRe: What is difference between debug,deploy,build and run in java Pin
Richard MacCutchan9-Aug-13 23:44
mveRichard MacCutchan9-Aug-13 23:44 
QuestionJava Thread in Networking Pin
santhosh kumar bhagavathi m9-Aug-13 1:46
santhosh kumar bhagavathi m9-Aug-13 1:46 
AnswerRe: Java Thread in Networking Pin
Richard MacCutchan9-Aug-13 23:45
mveRichard MacCutchan9-Aug-13 23:45 
GeneralRe: Java Thread in Networking Pin
cdenczek27-Aug-13 8:53
cdenczek27-Aug-13 8:53 
AnswerRe: Java Thread in Networking Pin
jschell10-Aug-13 11:27
jschell10-Aug-13 11:27 
Questionandroid app login issue Pin
LawlessBaron8-Aug-13 8:29
LawlessBaron8-Aug-13 8:29 
Hey guys i have got this code together for someone to log into a link and i need help finishing it off

any ideas why it won't login will output the message WORK IN PROGRESS meaning wrong credentials any help?

Java
package com.domain.app;
 
import java.util.ArrayList;
 
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
 
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.os.NetworkOnMainThreadException;
import android.os.StrictMode;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;


@SuppressLint("NewApi")
public class ServerLogin extends Activity {
    EditText un, pw;
    TextView error;
    Button ok;
    /** Called when the activity is first created. 
     * <a href="/Members/return">@return</a> */
    @SuppressLint("NewApi")
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_server_login);
        
        if(Build.VERSION.SDK_INT >= 9) {
            StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
            StrictMode.setThreadPolicy(policy); 
        }
        
        un = (EditText)findViewById(R.id.et_un);
        pw = (EditText)findViewById(R.id.et_pw);
        ok = (Button)findViewById(R.id.btn_login);
        error = (TextView)findViewById(R.id.tv_error);
 
        ok.setOnClickListener(new View.OnClickListener() {
        	@SuppressLint("NewApi")
            <a href="/Members/override">@Override</a>
            public void onClick(View v) {
                // TODO Auto-generated method stub
 
                String userName = un.getText().toString();
                String passWord = pw.getText().toString(); 
            	
                ArrayList<NameValuePair> postParameters = new ArrayList<NameValuePair>();
                postParameters.add(new BasicNameValuePair("username", un.getText().toString()));
                postParameters.add(new BasicNameValuePair("password", pw.getText().toString()));

                String response = null;
                try {
                    response = CustomHttpClient.executeHttpPost("http://www.domain.com/Launcherloginaccount.php?username="+ userName +"&password="+ passWord +"", postParameters);
                    String res = response.toString();
                    res = res.replaceAll("\\s+","");
                    if(res.equals("1"))
        				Toast.makeText(getBaseContext(), "HOLY F*** IT WORKED YOU LOGGED in :D", Toast.LENGTH_SHORT).show();
                    else
        				Toast.makeText(getBaseContext(), "WORK IN PROGRESS", Toast.LENGTH_SHORT).show();
                } catch (Exception e) {
                    un.setText(e.toString());
                }
            }
        });
    }
}

QuestionRe: android app login issue Pin
Richard MacCutchan8-Aug-13 21:46
mveRichard MacCutchan8-Aug-13 21:46 
AnswerRe: android app login issue Pin
LawlessBaron8-Aug-13 22:15
LawlessBaron8-Aug-13 22:15 
GeneralRe: android app login issue Pin
Richard MacCutchan8-Aug-13 23:09
mveRichard MacCutchan8-Aug-13 23:09 
GeneralRe: android app login issue Pin
LawlessBaron11-Aug-13 2:28
LawlessBaron11-Aug-13 2:28 
GeneralRe: android app login issue Pin
Richard MacCutchan11-Aug-13 2:42
mveRichard MacCutchan11-Aug-13 2:42 
GeneralRe: android app login issue Pin
LawlessBaron11-Aug-13 3:27
LawlessBaron11-Aug-13 3:27 
GeneralRe: android app login issue Pin
Richard MacCutchan11-Aug-13 3:39
mveRichard MacCutchan11-Aug-13 3:39 
GeneralRe: android app login issue Pin
LawlessBaron11-Aug-13 3:47
LawlessBaron11-Aug-13 3:47 
Questionconverting problem from cmyk to rgb image Pin
Shankar nehrumaharajan7-Aug-13 3:21
Shankar nehrumaharajan7-Aug-13 3:21 
Questionhow to draw smooth curve with java? Pin
xiaobai13795-Aug-13 17:32
xiaobai13795-Aug-13 17:32 
SuggestionRe: how to draw smooth curve with java? Pin
Richard MacCutchan5-Aug-13 20:48
mveRichard MacCutchan5-Aug-13 20:48 
Questioni can't pause the song in this code Pin
Member 101909835-Aug-13 8:52
Member 101909835-Aug-13 8:52 
AnswerRe: i can't pause the song in this code Pin
Richard MacCutchan5-Aug-13 20:46
mveRichard MacCutchan5-Aug-13 20:46 
GeneralRe: i can't pause the song in this code Pin
Member 101909836-Aug-13 4:42
Member 101909836-Aug-13 4:42 
GeneralRe: i can't pause the song in this code Pin
Richard MacCutchan6-Aug-13 4:56
mveRichard MacCutchan6-Aug-13 4:56 
QuestionTwo salt Values? Pin
chdboy3-Aug-13 5:14
chdboy3-Aug-13 5:14 
AnswerRe: Two salt Values? Pin
jschell3-Aug-13 5:18
jschell3-Aug-13 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.