Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.util.*;

public class Main {
    public static String xfid = "109066", xfsecret = "b1726be0ec9c6a1abe60e3d71ef72603";
    private static final String TAG = "KuaiDi100Helper";

    public static String getRequestUrl(String id, String secret, String com, String number, String encode) {
        StringBuffer resultUrl = new StringBuffer();
        resultUrl.append("http://api.ickd.cn/?id=" + (id != null ? id : xfid));
        resultUrl.append("&secret=" + (secret != null ? secret : xfsecret));
        resultUrl.append("&com=" + com);
        resultUrl.append("&nu=" + number);
        resultUrl.append("&encode=" + (encode != null ? encode : "gbk") + "&ord=asc");
        Log.i(TAG, "Request URL:" + resultUrl);
        return resultUrl.toString();
    }
}