Android Open Source - android-demowallet Store






From Project

Back to project page android-demowallet.

License

The source code is released under:

Apache License

If you think the Android project android-demowallet 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 org.webinos.demowallet;
//from w  w w .j a va2s  .  co  m
import android.os.Bundle;

public class Store {

    /** The merchant id. */
    public String storeID = "";
    /** The merchant authentication token. */
    public String storeDescription = "";

    private Store() {
    }

    /**
     * Instantiates a new Store.
     *
     * @param bundle : the bundle for unmarshalling to a Store
     */
    public Store(Bundle bundle) {
        if(bundle != null) {
            init(bundle.getString("storeID"),
                    bundle.getString("storeDescription"));
        }
        else
        {
            init("", "");
        }
    }

    /**
     * Instantiates a new Store.
     *
     * @param storeID : the Store id
     * @param storeDescription : the Store description (normally some authentication token should be here)
     */
    public Store(String storeID, String storeDescription) {
        init(storeID, storeDescription);
    }

    private void init(String storeID, String storeDescription) {
        this.storeID = storeID;
        this.storeDescription = storeDescription;
    }

    /**
     * To bundle.
     *
     * @return the Store marshalled to a bundle
     */
    public Bundle toBundle() {
        Bundle bundle = new Bundle();
        bundle.putString("storeID", storeID);
        bundle.putString("storeDescription", storeDescription);
        return bundle;
    }
}




Java Source Code List

org.webinos.demowallet.BillableItem.java
org.webinos.demowallet.Store.java
org.webinos.demowallet.TestWallet.java
org.webinos.demowallet.WalletEngine.java
org.webinos.demowallet.WalletServiceMessageHandler.java
org.webinos.demowallet.WalletService.java