Android Open Source - Android-MarketBin Market Bin






From Project

Back to project page Android-MarketBin.

License

The source code is released under:

MIT License

If you think the Android project Android-MarketBin 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.haunted.marketbin;
//ww w  . ja  v  a2s. c o  m
import java.util.ArrayList;

public class MarketBin {
    // All known market descriptors are got from static methods in order MarketBin
    // to consume less memory in runtime.
    // If you want to have them as static variables, you can always save any subset of
    // known markets as your own static variable.

    public static MarketDescriptor getGooglePlay() {
        return new MarketDescriptor("Google Play", "market://details?id=%s", "com.android.vending");
    }

    public static MarketDescriptor getGooglePlayWeb() {
        return new MarketDescriptor("Google Play WebSite", "https://play.google.com/store/apps/details?id=%s", null);
    }

    public static MarketDescriptor getSamsungApps() {
        return new MarketDescriptor("Samsung Apps", "samsungapps://ProductDetail/%s", "com.sec.android.app.samsungapps");
    }

    public static MarketDescriptor getSlideMe() {
        return new MarketDescriptor("SlideMe", "sam://details?id=%s", "com.slideme.sam.manager");
    }

    public static MarketDescriptor getYandexStore() {
        return new MarketDescriptor("Yandex.Store", "market://details?id=%s", "com.yandex.store");
    }

    public static ArrayList<MarketDescriptor> getAllKnown() {
        ArrayList<MarketDescriptor> result = new ArrayList<MarketDescriptor>(5);
        result.add(getSamsungApps());
        result.add(getSlideMe());
        result.add(getGooglePlay());
        result.add(getYandexStore());
        result.add(getGooglePlayWeb());
        return result;
    }
}




Java Source Code List

com.haunted.marketbin.IMarketDescriptor.java
com.haunted.marketbin.MarketBin.java
com.haunted.marketbin.MarketDescriptor.java
com.haunted.marketbin.MarketLocator.java
com.haunted.marketbin.MarketUI.java
com.haunted.marketbin.sample.FragmentCredits.java
com.haunted.marketbin.sample.FragmentMultiple.java
com.haunted.marketbin.sample.FragmentSingle.java
com.haunted.marketbin.sample.MainActivity.java
com.haunted.marketbin.sample.PackageDialogFragment.java