Android Open Source - android_sdk Merchant Activity






From Project

Back to project page android_sdk.

License

The source code is released under:

GNU Lesser General Public License

If you think the Android project android_sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.qubecelltestapp.ui;
/*from  ww  w  . ja va 2  s  .  co m*/
import java.util.ArrayList;
import java.util.HashMap;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.qubecell.constants.IntentConstant;
import com.qubecell.ui.BaseActivity;

public class MerchantActivity extends Activity {

  private Button startButton = null;
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(getResources().getIdentifier("activity_merchant", "layout", getPackageName()));

    startButton = ((Button)findViewById(getResources().getIdentifier("startbutton", "id", getPackageName())));  
    startButton.setOnClickListener(new View.OnClickListener() {

      public void onClick(View arg0) 
      {
        startPayment();      
      }
    });
  }

  @Override
  protected void onResume()
  {
    super.onResume();
  /*  String info = null;
    if(BaseActivity.getQubecellStatus())
    {
      info = "Result success" + String.valueOf(BaseActivity.getCahrgedAmount());
    }
    else 
    {
      info = "failure"; 
    }*/
    //Toast.makeText(getApplicationContext(), info, Toast.LENGTH_SHORT).show();      
  }      
  
  private  void startPayment() {
    Bitmap imageViewBit = BitmapFactory.decodeResource(getResources(), R.drawable.logo_new);
      BaseActivity.setLogoImage(imageViewBit);
    BaseActivity.setTitleText("Qubecell...");  
    BaseActivity.setBackGroundColor(0xffff0000); //  red  (0xff0000ff); //blue
    BaseActivity.setThemeColor(0xffcccccc); // light gray //(0xff00ff00);// grean      
    BaseActivity.setBillingPartner("Powered By Qubecell.");
    Intent nextActivity = new Intent(MerchantActivity.this, com.qubecell.ui.QubecellActivity.class);    

    ArrayList<HashMap<String, String>> listMap = new ArrayList<HashMap<String,String>>();
    HashMap<String, String> hMap = new HashMap<String, String>();

    hMap.put(IntentConstant.USERNAME, "U2FsdGVkX1++RS6lFZad68y57JzK4XaaBT5CmN0N4wU=");
    hMap.put(IntentConstant.PASSWORD, "U2FsdGVkX1/ZM1fnb/kW1Cnv+sRq+A==");
    hMap.put(IntentConstant.KEY, "98aa9d103ebb4f759f5a6143317ec98a");
    hMap.put(IntentConstant.MSISDN_USERNAME, "EninoV");
    hMap.put(IntentConstant.MSISDN_PASSWORD, "E9+ni12no@V_13");
    hMap.put(IntentConstant.MSISDN_KEY, "5d99bd2ab6d04a30bed34b26ec613247");
    hMap.put(IntentConstant.PRODUCT_ID, "QUBT");
    hMap.put(IntentConstant.VODA_PRODUCT_ID, "eninov_vodafone_t2");
    hMap.put(IntentConstant.IDEA_PRODUCT_ID, "eninov_idea_t2");
    hMap.put(IntentConstant.AIRTEL_PRODUCT_ID, "eninov_airtel_t2");
    hMap.put(IntentConstant.TATA_PRODUCT_ID, "eninov_tata_t2");
    hMap.put(IntentConstant.PAY_AMOUNT, "2");
    hMap.put(IntentConstant.MSISDN_ERROR_MSG, "I am msisdn error message.");
    hMap.put(IntentConstant.EVENTCHARGE_ERROR_MSG, "I am event charge error message.");
    hMap.put(IntentConstant.EVENTCHARGE_STATUS_MSG, "I am event status message.");
    hMap.put(IntentConstant.SENDOTP_ERROR_MSG, "I am sendotp error message.");
    listMap.add(hMap);        
    nextActivity.putExtra(IntentConstant.ARRAY_LIST, listMap);
    startActivity(nextActivity);  
  }
}




Java Source Code List

com.qubecell.beans.BaseBean.java
com.qubecell.beans.CheckStatusRespBean.java
com.qubecell.beans.EventChargeRespBean.java
com.qubecell.beans.MsisdnRespBean.java
com.qubecell.beans.OperatorDetails.java
com.qubecell.beans.OperatorsRespBean.java
com.qubecell.beans.ResponseBaseBean.java
com.qubecell.beans.SendOTPRespBean.java
com.qubecell.beans.ValidateOTPRespBean.java
com.qubecell.constants.ApplicationActivities.java
com.qubecell.constants.CheckstatusServerRespCode.java
com.qubecell.constants.ConstantStrings.java
com.qubecell.constants.EventChargeServerRespCode.java
com.qubecell.constants.HttpConstant.java
com.qubecell.constants.IntentConstant.java
com.qubecell.constants.MerchantData.java
com.qubecell.constants.MessageResponseCode.java
com.qubecell.constants.MobileOperators.java
com.qubecell.constants.MsisdnServerRespCode.java
com.qubecell.constants.NetworkResponseCode.java
com.qubecell.constants.NetworkResponse.java
com.qubecell.constants.NetworkURL.java
com.qubecell.constants.PaymentResult.java
com.qubecell.constants.ProductIds.java
com.qubecell.constants.QubecellResult.java
com.qubecell.constants.SendOTPServerRespCode.java
com.qubecell.constants.ServerCommand.java
com.qubecell.constants.ThemeConfigurationVariables.java
com.qubecell.constants.ValidateOTPServerRespCode.java
com.qubecell.constants.WidgetsTagName.java
com.qubecell.elogger.ELogger.java
com.qubecell.network.AsyncClient.java
com.qubecell.network.NetworkController.java
com.qubecell.receivers.SMSReceiver.java
com.qubecell.smsmgr.QubecellSMSManager.java
com.qubecell.ui.BaseActivity.java
com.qubecell.ui.QubecellActivity.java
com.qubecell.ui.ResultActivity.java
com.qubecell.ui.SelectOperatorActivity.java
com.qubecell.ui.ValidateOTPActivity.java
com.qubecell.utility.CommonUtility.java
com.qubecell.utility.ImageBase64.java
com.qubecell.xmlparser.XMLParser.java
com.qubecell.xmlparser.XMLfunctions.java
com.qubecelltestapp.ui.MerchantActivity.java