Click here to Skip to main content
15,880,392 members
Home / Discussions / Android
   

Android

 
AnswerRe: how to write POST methdod to PHP Pin
sadaiyappan_6-Oct-17 18:54
sadaiyappan_6-Oct-17 18:54 
GeneralRe: how to write POST methdod to PHP Pin
Richard MacCutchan6-Oct-17 22:02
mveRichard MacCutchan6-Oct-17 22:02 
GeneralRe: how to write POST methdod to PHP Pin
sadaiyappan_6-Oct-17 22:05
sadaiyappan_6-Oct-17 22:05 
GeneralRe: how to write POST methdod to PHP Pin
Richard MacCutchan6-Oct-17 22:13
mveRichard MacCutchan6-Oct-17 22:13 
QuestionRe: how to write POST methdod to PHP Pin
David Crow7-Oct-17 14:45
David Crow7-Oct-17 14:45 
QuestionShow a ProgressDialog inside a Fragment that is injected in a Tab Pin
Vimalsoft(Pty) Ltd30-Sep-17 5:54
professionalVimalsoft(Pty) Ltd30-Sep-17 5:54 
QuestionRe: Show a ProgressDialog inside a Fragment that is injected in a Tab Pin
David Crow2-Oct-17 3:09
David Crow2-Oct-17 3:09 
AnswerRe: Show a ProgressDialog inside a Fragment that is injected in a Tab Pin
Vimalsoft(Pty) Ltd2-Oct-17 7:11
professionalVimalsoft(Pty) Ltd2-Oct-17 7:11 
QuestionRe: Show a ProgressDialog inside a Fragment that is injected in a Tab Pin
David Crow2-Oct-17 7:14
David Crow2-Oct-17 7:14 
AnswerRe: Show a ProgressDialog inside a Fragment that is injected in a Tab Pin
Vimalsoft(Pty) Ltd2-Oct-17 7:25
professionalVimalsoft(Pty) Ltd2-Oct-17 7:25 
QuestionRe: Show a ProgressDialog inside a Fragment that is injected in a Tab Pin
David Crow2-Oct-17 7:30
David Crow2-Oct-17 7:30 
AnswerRe: Show a ProgressDialog inside a Fragment that is injected in a Tab Pin
Vimalsoft(Pty) Ltd2-Oct-17 7:37
professionalVimalsoft(Pty) Ltd2-Oct-17 7:37 
QuestionTiming and fragment creation Pin
David Crow29-Sep-17 7:44
David Crow29-Sep-17 7:44 
QuestionAndroid.Content.ActivityNotFoundException: Unable to find explicit activity class Pin
Vimalsoft(Pty) Ltd28-Sep-17 6:43
professionalVimalsoft(Pty) Ltd28-Sep-17 6:43 
SuggestionRe: Android.Content.ActivityNotFoundException: Unable to find explicit activity class Pin
Richard MacCutchan28-Sep-17 9:44
mveRichard MacCutchan28-Sep-17 9:44 
GeneralRe: Android.Content.ActivityNotFoundException: Unable to find explicit activity class Pin
Vimalsoft(Pty) Ltd28-Sep-17 22:44
professionalVimalsoft(Pty) Ltd28-Sep-17 22:44 
GeneralHow are chat application in Android used? Pin
Salfishya Mary28-Sep-17 3:58
Salfishya Mary28-Sep-17 3:58 
GeneralRe: How are chat application in Android used? Pin
Richard MacCutchan28-Sep-17 5:20
mveRichard MacCutchan28-Sep-17 5:20 
GeneralRe: How are chat application in Android used? Pin
Sienna Amelia3-Oct-17 2:07
Sienna Amelia3-Oct-17 2:07 
QuestionSQL server connection in Android Pin
Malashree Halade19-Sep-17 20:26
Malashree Halade19-Sep-17 20:26 
AnswerRe: SQL server connection in Android Pin
Richard MacCutchan19-Sep-17 22:11
mveRichard MacCutchan19-Sep-17 22:11 
AnswerRe: SQL server connection in Android Pin
Vimalsoft(Pty) Ltd25-Sep-17 4:12
professionalVimalsoft(Pty) Ltd25-Sep-17 4:12 
QuestionAccess MySql using php script from Android app.. Pin
Member 1341654718-Sep-17 16:03
Member 1341654718-Sep-17 16:03 
QuestionRe: Access MySql using php script from Android app.. Pin
David Crow19-Sep-17 9:47
David Crow19-Sep-17 9:47 
AnswerRe: Access MySql using php script from Android app.. Pin
Member 1341654720-Sep-17 16:03
Member 1341654720-Sep-17 16:03 
Sorry David, below is the full function. When I run the app on the phone it just closes down. (I reworked code and it doen't go to CATCH now.) If I comment out the
connection.connect();
line, it runs thru with no error. If I paste the url (http://xxx.xxx.xxx/myscript.php) into a browser it works and inserts a record into my table.
private void  Testphp2() {
    try {

        URL url;
        HttpURLConnection connection = null;
        url = new URL("http://xxx.xxx.xxx/myscript.php");
        connection = (HttpURLConnection) url.openConnection();
        connection.setReadTimeout(3000);
        connection.setConnectTimeout(3000);
        connection.setRequestMethod("POST");
        connection.setDoInput(true);
        Toast.makeText(getApplicationContext(), "About to try", Toast.LENGTH_LONG).show();
        connection.connect();
        Toast.makeText(getApplicationContext(), "Success", Toast.LENGTH_LONG).show();

    } catch (IOException e) {
        e.printStackTrace();
        Toast.makeText(getApplicationContext(), "error" , Toast.LENGTH_LONG).show();
    }
}

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.