Click here to Skip to main content
15,892,059 members
Home / Discussions / Android
   

Android

 
Questiontakes too long to run android simulator, looking for alternatives. Pin
ankum1623-Feb-14 18:33
ankum1623-Feb-14 18:33 
AnswerRe: takes too long to run android simulator, looking for alternatives. Pin
Naveenvenk25-Feb-14 7:07
Naveenvenk25-Feb-14 7:07 
AnswerRe: takes too long to run android simulator, looking for alternatives. Pin
Kornfeld Eliyahu Peter26-Feb-14 5:29
professionalKornfeld Eliyahu Peter26-Feb-14 5:29 
AnswerRe: takes too long to run android simulator, looking for alternatives. Pin
Peter Leow1-Mar-14 3:34
professionalPeter Leow1-Mar-14 3:34 
AnswerRe: takes too long to run android simulator, looking for alternatives. Pin
Member 105770039-Mar-14 8:15
Member 105770039-Mar-14 8:15 
QuestionAndroid AsynkTask Taking too Long Rotating Progress Dialog Pin
Cyber1221-Feb-14 21:38
Cyber1221-Feb-14 21:38 
AnswerRe: Android AsynkTask Taking too Long to respond Pin
Cyber1221-Feb-14 23:13
Cyber1221-Feb-14 23:13 
AnswerRe: Android AsynkTask Taking too Long Rotating Progress Dialog Pin
BupeChombaDerrick9-Mar-14 1:01
BupeChombaDerrick9-Mar-14 1:01 
First you are not supposed to access UI components directly from a background thread.

Java
String doInBackground(String... args) {

               String firstName = args[0];
               String lastName = args[1];
               String email = args[2];
               String password = args[3];
               String experience = args[4];
               String eduLevel = args[5];
               String phoneNo = args[6];

// create the parser inside doInBackground 
JSONParser jsonParser = new JSONParser();
.....

JSONObject json = jsonParser.makeHttpRequest(URL_RegisterJobSeeker,
                         "POST", params);

return String.valueOf(json.getInt(TAG_SUCCESS));

}

//NOTE: Only Interact with the UI components only in onPostExecute or onPreExecute
//After completing background task Dismiss the progress dialog

          protected void onPostExecute(String success) {
               // dismiss the dialog once done
                     pDialog.dismiss();

                    if (success == "1") {
                         // successfully created product
 
                         Toast.makeText(RegisterJobSeeker.this,
                                   "Job Seeker Successfully Registered.",
                                   Toast.LENGTH_LONG).show();;
                         // Intent i = new
                         // Intent(getApplicationContext(),RegisterJobSeeker.class);
                         // startActivity(i);
                         // closing this screen
                         // finish();
                    } else {
                         // failed to create product
                    }
               
          }


You might want to host your AsyncTask in a headless fragment so that device configuration changes don't crash your app.

Hope this helps.
“Everything is simple when you take your time to analyze it.”

QuestionAndroid Sync Adapter Xamarin Pin
Naga Suresh18-Feb-14 1:13
Naga Suresh18-Feb-14 1:13 
AnswerRe: Android Sync Adapter Xamarin Pin
Ahmed Bensaid26-Feb-14 2:17
professionalAhmed Bensaid26-Feb-14 2:17 
AnswerRe: Call blocking Pin
Peter Leow16-Feb-14 13:26
professionalPeter Leow16-Feb-14 13:26 
SuggestionRe: Call blocking Pin
Richard MacCutchan16-Feb-14 22:58
mveRichard MacCutchan16-Feb-14 22:58 
GeneralRe: Call blocking Pin
Tom Marvolo Riddle16-Feb-14 23:19
professionalTom Marvolo Riddle16-Feb-14 23:19 
QuestionRe: Call blocking Pin
thatraja16-Feb-14 23:40
professionalthatraja16-Feb-14 23:40 
AnswerRe: Call blocking Pin
Richard MacCutchan17-Feb-14 0:37
mveRichard MacCutchan17-Feb-14 0:37 
GeneralRe: Call blocking Pin
Richard Deeming17-Feb-14 2:09
mveRichard Deeming17-Feb-14 2:09 
GeneralRe: Call blocking Pin
Richard MacCutchan17-Feb-14 2:32
mveRichard MacCutchan17-Feb-14 2:32 
QuestionWhich environment... Pin
Kornfeld Eliyahu Peter12-Feb-14 10:47
professionalKornfeld Eliyahu Peter12-Feb-14 10:47 
AnswerRe: Which environment... Pin
Jubayer Ahmed12-Feb-14 18:01
professionalJubayer Ahmed12-Feb-14 18:01 
AnswerRe: Which environment... Pin
Ahmed Bensaid13-Feb-14 2:44
professionalAhmed Bensaid13-Feb-14 2:44 
AnswerRe: Which environment... Pin
thatraja13-Feb-14 3:32
professionalthatraja13-Feb-14 3:32 
AnswerRe: Which environment... Pin
ManvendraKumarSah14-Feb-14 2:24
ManvendraKumarSah14-Feb-14 2:24 
AnswerRe: Which environment... Pin
Member 1058259714-Feb-14 6:48
Member 1058259714-Feb-14 6:48 
QuestionUI / Model Hook Up Pin
DaveyM6912-Feb-14 2:02
professionalDaveyM6912-Feb-14 2:02 
AnswerRe: UI / Model Hook Up Pin
DaveyM6911-Mar-14 4:15
professionalDaveyM6911-Mar-14 4:15 

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.