@Override protected void onPostExecute(String result) { if (Tabbars.getInstance() != null && Tabbars.getInstance().getProgressDialog() != null && Tabbars.getInstance().getProgressDialog().isShowing()) Tabbars.getInstance().getProgressDialog().dismiss(); else if (RotiHomeActivity.getInstance() != null && RotiHomeActivity.getInstance().getProgressDialog() != null && RotiHomeActivity.getInstance().getProgressDialog().isShowing()) RotiHomeActivity.getInstance().getProgressDialog().dismiss(); if (result != null && !result.equals("")) { try { JSONObject resObject = new JSONObject(result); String sucess = resObject.getString("status"); if (sucess != null && !sucess.equals("") && sucess.equals("true")) { // showSKIPServeyPage(); skipbtn(); // showReceiptCompletePage(); } } catch (Exception e) { e.printStackTrace(); } } }
@Override protected void onPreExecute() { if (Tabbars.getInstance() != null && Tabbars.getInstance().getProgressDialog() != null && !Tabbars.getInstance().getProgressDialog().isShowing()) Tabbars.getInstance().getProgressDialog().show(); else if (RotiHomeActivity.getInstance() != null && RotiHomeActivity.getInstance().getProgressDialog() != null && !RotiHomeActivity.getInstance().getProgressDialog().isShowing()) RotiHomeActivity.getInstance().getProgressDialog().show(); // progressBar.setVisibility(View.VISIBLE); }
public void oPenTabView(int tabnum) { if (Tabbars.getInstance() == null) { // Toast.makeText(mHomePage, "main2", Toast.LENGTH_SHORT).show(); Intent newIntent = new Intent(RotiHomeActivity.this, Tabbars.class); newIntent.putExtra(AppConstants.INTENT_EXTRA_HOME_TABNUMBER, tabnum); startActivity(newIntent); finish(); } else { // Toast.makeText(mHomePage, "main", Toast.LENGTH_SHORT).show(); Tabbars.getInstance().SetcurrentTabs(tabnum); } // Intent newIntent = new Intent(RotiHomeActivity.this, Tabbars.class); // newIntent.putExtra(AppConstants.INTENT_EXTRA_HOME_TABNUMBER, tabnum); // startActivity(newIntent); // finish(); prefsEditor.putBoolean(AppConstants.PREF_HOME_ISOPENHOMEPAGE, false); prefsEditor.commit(); }
@Override protected String doInBackground(String... params) { String result = ""; String authToken = Tabbars.getInstance().getPreference().getString(AppConstants.PREFAUTH_TOKEN, ""); List<NameValuePair> nameparams = new ArrayList<NameValuePair>(); nameparams.add(new BasicNameValuePair("appkey", AppConstants.APPKEY)); nameparams.add(new BasicNameValuePair("auth_token", authToken)); nameparams.add(new BasicNameValuePair("survey_id", surveyId)); // id nameparams.add(new BasicNameValuePair("receipt_id", receiptId)); // id result = WebHTTPMethodClass.executeHttPost("/survey/skip", nameparams); // loginService(); return result; }