├── app ├── .gitignore ├── libs │ ├── mid-sdk-2.20.jar │ ├── jg_filter_sdk_1.1.jar │ ├── wup-1.0.0-SNAPSHOT.jar │ ├── armeabi │ │ ├── libtpnsSecurity.so │ │ └── libtpnsWatchdog.so │ └── Xg_sdk_v2.39_20150915_1121.jar ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── Thumbs.db │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── Thumbs.db │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-hdpi │ │ │ │ ├── Thumbs.db │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_head_back.png │ │ │ │ ├── ic_head_more.png │ │ │ │ ├── popupwindow_donate.png │ │ │ │ ├── popupwindow_logout.png │ │ │ │ ├── popupwindow_update.png │ │ │ │ └── popupwindow_setting.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── Thumbs.db │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── Thumbs.db │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── Thumbs.db │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable │ │ │ │ ├── bg_view_frame.xml │ │ │ │ ├── bg_view_frame_green.xml │ │ │ │ ├── bg_view_frame_red.xml │ │ │ │ ├── bg_button_no_shape.xml │ │ │ │ ├── bg_button_main.xml │ │ │ │ ├── bg_button_main_dialing.xml │ │ │ │ ├── bg_button_main_dial_error.xml │ │ │ │ └── bg_button_main_dial_success.xml │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── notification_heart.xml │ │ │ │ ├── doalog_notice.xml │ │ │ │ ├── layout_header.xml │ │ │ │ ├── doalog_update.xml │ │ │ │ ├── doalog_router_set.xml │ │ │ │ ├── doalog_exit.xml │ │ │ │ ├── popupwindow_setting.xml │ │ │ │ ├── doalog_pay.xml │ │ │ │ └── activity_main.xml │ │ ├── jniLibs │ │ │ └── armeabi │ │ │ │ ├── libtpnsSecurity.so │ │ │ │ └── libtpnsWatchdog.so │ │ ├── java │ │ │ └── cn │ │ │ │ └── mandroid │ │ │ │ └── wtshanxun │ │ │ │ ├── event │ │ │ │ ├── ExitApp.java │ │ │ │ ├── StopHeartEvent.java │ │ │ │ ├── TotalEvent.java │ │ │ │ ├── GetUserEvent.java │ │ │ │ └── CheckCallBackEvent.java │ │ │ │ ├── Model │ │ │ │ ├── FetchCallback.java │ │ │ │ ├── Bean │ │ │ │ │ ├── BasicBean.java │ │ │ │ │ ├── UserBean.java │ │ │ │ │ └── BeanManager.java │ │ │ │ ├── UserManager.java │ │ │ │ ├── ApiManager.java │ │ │ │ ├── HeartManager.java │ │ │ │ └── ShanxunManager.java │ │ │ │ ├── UI │ │ │ │ ├── dialog │ │ │ │ │ ├── SuperDialog.java │ │ │ │ │ ├── NoticeDialog.java │ │ │ │ │ ├── ExitDialog.java │ │ │ │ │ ├── RouterSetDialog.java │ │ │ │ │ └── UpdateDialog.java │ │ │ │ ├── common │ │ │ │ │ ├── App.java │ │ │ │ │ ├── BasicActivity.java │ │ │ │ │ └── PopupWindowClick.java │ │ │ │ ├── widget │ │ │ │ │ ├── AlwaysMarqueeTextView.java │ │ │ │ │ ├── MyProgressBar.java │ │ │ │ │ └── ActionBar.java │ │ │ │ ├── Service │ │ │ │ │ └── HeartService.java │ │ │ │ └── activity │ │ │ │ │ └── MainActivity.java │ │ │ │ └── utils │ │ │ │ ├── MToast.java │ │ │ │ ├── Constant.java │ │ │ │ ├── Sto16.java │ │ │ │ ├── MLog.java │ │ │ │ ├── MD5.java │ │ │ │ ├── Const.java │ │ │ │ ├── Udp.java │ │ │ │ ├── PreferenceHelper.java │ │ │ │ ├── Preference.java │ │ │ │ ├── Pin.java │ │ │ │ ├── Tools.java │ │ │ │ ├── Base64.java │ │ │ │ └── CheckUtils.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── cn │ │ │ └── mandroid │ │ │ └── wtshanxun │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── cn │ │ └── mandroid │ │ └── wtshanxun │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── README.md ├── gradle.properties ├── sx.iml ├── wtshanxun.iml ├── gradlew.bat ├── gradlew └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/libs/mid-sdk-2.20.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/libs/mid-sdk-2.20.jar -------------------------------------------------------------------------------- /app/libs/jg_filter_sdk_1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/libs/jg_filter_sdk_1.1.jar -------------------------------------------------------------------------------- /app/libs/wup-1.0.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/libs/wup-1.0.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/libs/armeabi/libtpnsSecurity.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/libs/armeabi/libtpnsSecurity.so -------------------------------------------------------------------------------- /app/libs/armeabi/libtpnsWatchdog.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/libs/armeabi/libtpnsWatchdog.so -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/mipmap-hdpi/Thumbs.db -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/mipmap-mdpi/Thumbs.db -------------------------------------------------------------------------------- /app/libs/Xg_sdk_v2.39_20150915_1121.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/libs/Xg_sdk_v2.39_20150915_1121.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/drawable-hdpi/Thumbs.db -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/mipmap-xhdpi/Thumbs.db -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/mipmap-xxhdpi/Thumbs.db -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/mipmap-xxxhdpi/Thumbs.db -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libtpnsSecurity.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/jniLibs/armeabi/libtpnsSecurity.so -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libtpnsWatchdog.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/jniLibs/armeabi/libtpnsWatchdog.so -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_head_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/drawable-hdpi/ic_head_back.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_head_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/drawable-hdpi/ic_head_more.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/popupwindow_donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/drawable-hdpi/popupwindow_donate.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/popupwindow_logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/drawable-hdpi/popupwindow_logout.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/popupwindow_update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/drawable-hdpi/popupwindow_update.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/popupwindow_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrBug/wtshanxun/HEAD/app/src/main/res/drawable-hdpi/popupwindow_setting.png -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/event/ExitApp.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.event; 2 | 3 | /** 4 | * Created by Administrator on 2015-11-22. 5 | */ 6 | public class ExitApp { 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | app/app-release.apk 9 | app/app-release/ 10 | /app/*.iml 11 | .idea/ -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/event/StopHeartEvent.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.event; 2 | 3 | /** 4 | * Created by Administrator on 2015-11-24. 5 | */ 6 | public class StopHeartEvent { 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/Model/FetchCallback.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.Model; 2 | 3 | /** 4 | * Created by Administrator on 2015-11-22. 5 | */ 6 | public interface FetchCallback { 7 | public void get(String result); 8 | public void error(); 9 | } 10 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Nov 22 17:45:21 CST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_view_frame.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_view_frame_green.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_view_frame_red.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | > 2 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/test/java/cn/mandroid/wtshanxun/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/event/TotalEvent.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.event; 2 | 3 | /** 4 | * Created by Administrator on 2015-11-26. 5 | */ 6 | public class TotalEvent { 7 | public int getSendHeartCount() { 8 | return sendHeartCount; 9 | } 10 | 11 | public void setSendHeartCount() { 12 | sendHeartCount++; 13 | } 14 | 15 | private static int sendHeartCount; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /app/src/androidTest/java/cn/mandroid/wtshanxun/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/event/GetUserEvent.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.event; 2 | 3 | import cn.mandroid.wtshanxun.Model.Bean.UserBean; 4 | 5 | /** 6 | * Created by Administrator on 2015-11-22. 7 | */ 8 | public class GetUserEvent { 9 | public UserBean getUserBean() { 10 | return userBean; 11 | } 12 | 13 | private UserBean userBean; 14 | public GetUserEvent(UserBean userBean) { 15 | this.userBean=userBean; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/UI/dialog/SuperDialog.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.UI.dialog; 2 | 3 | import android.app.Dialog; 4 | import android.content.Context; 5 | import android.view.WindowManager; 6 | 7 | /** 8 | * Created by Administrator on 2015-10-21. 9 | */ 10 | public class SuperDialog extends Dialog { 11 | public SuperDialog(Context context, int theme) { 12 | super(context, theme); 13 | getWindow().setType(WindowManager.LayoutParams.TYPE_TOAST); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/UI/common/App.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.UI.common; 2 | 3 | import android.app.Application; 4 | 5 | import com.pgyersdk.crash.PgyCrashManager; 6 | 7 | import org.androidannotations.annotations.EApplication; 8 | 9 | 10 | /** 11 | * Created by Administrator on 2015-11-22. 12 | */ 13 | @EApplication 14 | public class App extends Application{ 15 | @Override 16 | public void onCreate() { 17 | super.onCreate(); 18 | PgyCrashManager.register(this); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #313030 7 | #101010 8 | #43AA76 9 | #ff1111 10 | #339933 11 | #313030 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/utils/MToast.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.utils; 2 | 3 | import android.content.Context; 4 | import android.os.Handler; 5 | import android.os.Message; 6 | import android.widget.Toast; 7 | 8 | public class MToast { 9 | public static void show(Context context, String toast) { 10 | Toast.makeText(context, toast, Toast.LENGTH_SHORT).show(); 11 | } 12 | 13 | public static void showError(Context context, int status) { 14 | 15 | } 16 | public static void showError(Context context, String msg) { 17 | show(context, msg); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 闪讯WIFI助手 3 | 仅需支付49元,即可获得VIP身份,永久使用本软件\n使用淘宝支付的在支付成功后请联系店家开通VIP\n支付成功后需要重新登录账号才能使用VIP特权 4 | application/x-www-form-urlencoded 5 | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 6 | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 7 | zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3 8 | gzip, deflate 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/utils/Constant.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.utils; 2 | 3 | /** 4 | * Created by Administrator on 2015-11-15. 5 | */ 6 | public class Constant { 7 | // public static String API_URL = "http://qq75376632.vicp.cc:18409/index.php"; 8 | public static String API_URL = "http://sx.mandroid.cn/index.php"; 9 | 10 | public static int SUCCESS = 1; 11 | public static int CREATE_USER = 1001; 12 | public static int MOVE_OLD_USER = 1002; 13 | public static int ERROR_SESSION = 1003; 14 | public static String DEVICES_IP; 15 | public static class Code { 16 | public static int SUCCESS = 1; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wtshanxun 2 | #豌豆荚地址: 3 | http://www.wandoujia.com/apps/cn.mandroid.wtshanxun 4 | #心跳接口: 5 | ## request 6 | Url: http://sx.mandroid.cn/index.php/heart/getByRouter 7 | 8 | Method: POST/GET 9 | 10 | Query: 11 | user=[闪讯账号] 12 | 13 | ip=[IP地址] 14 | 15 | 示例:http://sx.mandroid.cn/index.php/heart/getByRouter?user=123456@ABC.XY&ip=192.168.1.1 16 | ## response: 17 | { 18 | "status": 200, 19 | "data": { 20 | "packData": "U04AYwOCQpY85mPaVnecguWKlDde4wIAB8CoAQEDAAwxLjIuMTguMjgUACNiNTcyYjI1NjEwODA4ZGE1N2QyY2Y0YWEyMGViZmE2ORIAB1br6zcBABAxMjM0NTZAQUJDLlhZ", //base64encode 21 | "sendIp": "115.239.134.167", 22 | "sendPort": 8080 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_button_no_shape.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | /> 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | /> 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/Model/Bean/BasicBean.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.Model.Bean; 2 | 3 | /** 4 | * Created by Administrator on 2015-11-22. 5 | */ 6 | public class BasicBean { 7 | private int status; 8 | private String msg; 9 | 10 | public String getData() { 11 | return data.toString(); 12 | } 13 | 14 | public void setData(Object data) { 15 | this.data = data; 16 | } 17 | 18 | public int getStatus() { 19 | return status; 20 | } 21 | 22 | public void setStatus(int status) { 23 | this.status = status; 24 | } 25 | 26 | public String getMsg() { 27 | return msg; 28 | } 29 | 30 | public void setMsg(String msg) { 31 | this.msg = msg; 32 | } 33 | 34 | private Object data; 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/utils/Sto16.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.utils; 2 | 3 | public class Sto16 { 4 | public static String bin2hex(String bin) { 5 | char[] digital = "0123456789ABCDEF".toCharArray(); 6 | StringBuffer sb = new StringBuffer(""); 7 | byte[] bs = bin.getBytes(); 8 | int bit; 9 | for (int i = 0; i < bs.length; i++) { 10 | sb.append('%'); 11 | bit = (bs[i] & 0x0f0) >> 4; 12 | sb.append(digital[bit]); 13 | bit = bs[i] & 0x0f; 14 | sb.append(digital[bit]); 15 | } 16 | String res = sb.toString(); 17 | String a = "%58%59"; 18 | int index = res.lastIndexOf(a); 19 | res = res.substring(0, index) + a; 20 | return res; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/event/CheckCallBackEvent.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.event; 2 | 3 | /** 4 | * Created by Administrator on 2015-11-23. 5 | */ 6 | public class CheckCallBackEvent { 7 | public final static int CHECK_NETWORK_VALID=1; 8 | private boolean isSuccess; 9 | 10 | public CheckCallBackEvent(boolean isSuccess, int action) { 11 | this.isSuccess = isSuccess; 12 | this.action = action; 13 | } 14 | 15 | public boolean isSuccess() { 16 | return isSuccess; 17 | } 18 | 19 | public void setIsSuccess(boolean isSuccess) { 20 | this.isSuccess = isSuccess; 21 | } 22 | 23 | public int getAction() { 24 | return action; 25 | } 26 | 27 | public void setAction(int action) { 28 | this.action = action; 29 | } 30 | 31 | private int action; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_button_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_button_main_dialing.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_button_main_dial_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_button_main_dial_success.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/utils/MLog.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.utils; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.util.Log; 7 | 8 | public class MLog { 9 | private static boolean display = false; 10 | public static void i(Object log) { 11 | if (display) { 12 | Log.i(Const.LOG_TAG, log + ""); 13 | } 14 | 15 | } 16 | public static void v(String log) { 17 | if (display) { 18 | Log.v(Const.LOG_TAG, log); 19 | } 20 | 21 | } 22 | 23 | public static void d(String log) { 24 | if (display) { 25 | Log.d(Const.LOG_TAG, log); 26 | } 27 | 28 | } 29 | 30 | public static void e(String log) { 31 | if (display) { 32 | Log.e(Const.LOG_TAG, log); 33 | } 34 | 35 | } 36 | 37 | public static void w(String log) { 38 | if (display) { 39 | Log.w(Const.LOG_TAG, log); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/utils/MD5.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.utils; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.security.MessageDigest; 5 | import java.security.NoSuchAlgorithmException; 6 | 7 | public class MD5 { 8 | public static String encode(String string) { 9 | byte[] hash; 10 | try { 11 | hash = MessageDigest.getInstance("MD5").digest(string.getBytes("UTF-8")); 12 | } catch (NoSuchAlgorithmException e) { 13 | throw new RuntimeException("Huh, MD5 should be supported?", e); 14 | } catch (UnsupportedEncodingException e) { 15 | throw new RuntimeException("Huh, UTF-8 should be supported?", e); 16 | } 17 | 18 | StringBuilder hex = new StringBuilder(hash.length * 2); 19 | for (byte b : hash) { 20 | if ((b & 0xFF) < 0x10) hex.append("0"); 21 | hex.append(Integer.toHexString(b & 0xFF)); 22 | } 23 | return hex.toString(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /sx.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /wtshanxun.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/utils/Const.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.utils; 2 | 3 | import java.io.File; 4 | 5 | import android.content.Context; 6 | import android.os.Environment; 7 | 8 | public class Const { 9 | public static String LOG_TAG = "LOG_TAG"; 10 | public static String TBPAY_URL = "https://item.taobao.com/item.htm?spm=686.1000925.0.0.yJP7hz&id=522902751643https://item.taobao.com/item.htm?spm=686.1000925.0.0.yJP7hz&id=522902751643"; 11 | public static String ADID = "50d71542fec25f97"; 12 | public static String ADSECRET = "5445243e7e902992"; 13 | private static String APP_MODEL = "original V"; 14 | public static String getAppModel(Context context){ 15 | return APP_MODEL+Tools.getVersion(context); 16 | } 17 | public static String getDownloadPath() { 18 | File sdDir = Environment.getExternalStorageDirectory();// 获取跟目录 19 | File dir = new File(sdDir.toString() + "/sxDownload"); 20 | if (!dir.exists()) { 21 | dir.mkdirs(); 22 | } 23 | return sdDir.toString() + "/sxDownload"; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/UI/widget/AlwaysMarqueeTextView.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.UI.widget; 2 | 3 | import android.content.Context; 4 | import android.content.res.TypedArray; 5 | import android.graphics.Canvas; 6 | import android.graphics.Color; 7 | import android.graphics.Paint; 8 | import android.graphics.drawable.Drawable; 9 | import android.text.TextPaint; 10 | import android.util.AttributeSet; 11 | import android.view.View; 12 | import android.widget.TextView; 13 | 14 | import cn.mandroid.wtshanxun.R; 15 | 16 | /** 17 | * TODO: document your custom view class. 18 | */ 19 | public class AlwaysMarqueeTextView extends TextView { 20 | public AlwaysMarqueeTextView(Context context) { 21 | super(context); 22 | } 23 | 24 | public AlwaysMarqueeTextView(Context context, AttributeSet attrs) { 25 | super(context, attrs); 26 | } 27 | 28 | public AlwaysMarqueeTextView(Context context, AttributeSet attrs, int defStyle) { 29 | super(context, attrs, defStyle); 30 | } 31 | 32 | @Override 33 | public boolean isFocused() { 34 | return true; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/Model/Bean/UserBean.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.Model.Bean; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * Created by Administrator on 2015-11-15. 7 | */ 8 | public class UserBean extends BasicBean implements Serializable{ 9 | private String sxAcount; 10 | private String sessionId; 11 | private int uid; 12 | private int coin ; 13 | 14 | public String getPassword() { 15 | return password; 16 | } 17 | 18 | public void setPassword(String password) { 19 | this.password = password; 20 | } 21 | 22 | public int getUid() { 23 | return uid; 24 | } 25 | 26 | public void setUid(int uid) { 27 | this.uid = uid; 28 | } 29 | 30 | private String password; 31 | public String getSxAcount() { 32 | return sxAcount; 33 | } 34 | 35 | public void setSxAcount(String sxAcount) { 36 | this.sxAcount = sxAcount; 37 | } 38 | 39 | public String getSessionId() { 40 | return sessionId; 41 | } 42 | 43 | public void setSessionId(String sessionId) { 44 | this.sessionId = sessionId; 45 | } 46 | public void setCoin(int coin) { 47 | this.coin = coin; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/utils/Udp.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.utils; 2 | 3 | import java.io.IOException; 4 | import java.io.UnsupportedEncodingException; 5 | import java.net.DatagramPacket; 6 | import java.net.DatagramSocket; 7 | import java.net.InetSocketAddress; 8 | import java.net.SocketException; 9 | 10 | import cn.mandroid.wtshanxun.utils.MLog; 11 | 12 | public class Udp { 13 | private DatagramSocket clientSocket = null; 14 | private InetSocketAddress serverAddress = null; 15 | private byte[] data; 16 | 17 | private Udp(String host, int port, byte[] data) throws SocketException { 18 | clientSocket = new DatagramSocket(); 19 | serverAddress = new InetSocketAddress(host, port); 20 | this.data = data; 21 | } 22 | 23 | public static Udp instance(String host, int port, byte[] data) throws SocketException { 24 | return new Udp(host, port, data); 25 | } 26 | 27 | public void send() { 28 | DatagramPacket packet = null; 29 | try { 30 | packet = new DatagramPacket(data, data.length, 31 | serverAddress); 32 | clientSocket.send(packet); 33 | clientSocket.close(); 34 | } catch (SocketException e) { 35 | } catch (IOException e) { 36 | } 37 | 38 | } 39 | } -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/Model/Bean/BeanManager.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.Model.Bean; 2 | 3 | import android.content.Context; 4 | 5 | import com.tencent.android.tpush.XGPushManager; 6 | 7 | 8 | import cn.mandroid.wtshanxun.utils.CheckUtils; 9 | import cn.mandroid.wtshanxun.utils.Preference; 10 | 11 | /** 12 | * Created by Administrator on 2015-11-15. 13 | */ 14 | public class BeanManager { 15 | private static UserBean userBean; 16 | 17 | public static UserBean getUserBean(Context context) { 18 | Preference preference = Preference.instance(context); 19 | if (CheckUtils.stringIsEmpty(preference.getString(Preference.SX_USER))) { 20 | return null; 21 | } 22 | if (userBean == null) { 23 | userBean = new UserBean(); 24 | String user = preference.getString(Preference.SX_USER); 25 | userBean.setSessionId(preference.getString(Preference.SESSION_ID)); 26 | userBean.setSxAcount(user); 27 | XGPushManager.registerPush(context, user); 28 | // XGPushConfig.enableDebug(context, true); 29 | } 30 | return userBean; 31 | } 32 | 33 | public static void cleanUser(Context context) { 34 | userBean = null; 35 | XGPushManager.unregisterPush(context); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in d:\Program Files\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For ic_head_more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #}Warning:org.androidannotations.api.rest.RestClientHeaders: can't find referenced class org.springframework.http.HttpAuthentication 18 | -dontwarn net.youmi.android.** 19 | -keep class net.youmi.android.** { *;} 20 | 21 | -dontwarn org.apache.http.** 22 | -keep class org.apache.http.** { *;} 23 | 24 | -dontwarn org.springframework.** 25 | -keep class org.springframework.** { *;} 26 | 27 | -dontwarn com.tencent.android.tpush.** 28 | -keep class com.tencent.android.tpush.** { *;} 29 | 30 | -dontwarn com.pgyersdk.** 31 | -keep class com.pgyersdk.** { *; } 32 | -keepclassmembers class ** { 33 | public void onEvent*(**); 34 | void onEvent*(**); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/UI/common/BasicActivity.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.UI.common; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.os.Bundle; 6 | 7 | import cn.mandroid.wtshanxun.event.ExitApp; 8 | import cn.mandroid.wtshanxun.utils.Preference; 9 | import cn.mandroid.wtshanxun.utils.PreferenceHelper; 10 | import de.greenrobot.event.EventBus; 11 | 12 | /** 13 | * Created by Administrator on 2015-11-22. 14 | */ 15 | public class BasicActivity extends Activity { 16 | protected Context context; 17 | protected Preference preference; 18 | protected PreferenceHelper preferenceHelper; 19 | 20 | @Override 21 | protected void onCreate(Bundle savedInstanceState) { 22 | super.onCreate(savedInstanceState); 23 | context = this; 24 | preference = Preference.instance(context); 25 | preferenceHelper = PreferenceHelper.instance(context); 26 | EventBus.getDefault().register(this); 27 | } 28 | 29 | @Override 30 | protected void onStop() { 31 | 32 | super.onStop(); 33 | } 34 | 35 | public void onEvent(ExitApp exit) { 36 | finish(); 37 | } 38 | 39 | protected void exitApp() { 40 | EventBus.getDefault().post(new ExitApp()); 41 | } 42 | 43 | @Override 44 | protected void onDestroy() { 45 | EventBus.getDefault().unregister(this); 46 | super.onDestroy(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/utils/PreferenceHelper.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.utils; 2 | 3 | import android.content.Context; 4 | 5 | import org.json.JSONException; 6 | import org.json.JSONObject; 7 | 8 | import cn.mandroid.wtshanxun.Model.Bean.BeanManager; 9 | import cn.mandroid.wtshanxun.utils.Preference; 10 | 11 | /** 12 | * Created by Administrator on 2015-11-15. 13 | */ 14 | public class PreferenceHelper { 15 | Context context; 16 | Preference preference; 17 | private static PreferenceHelper helper; 18 | 19 | private PreferenceHelper(Context context) { 20 | this.context = context; 21 | preference = Preference.instance(context); 22 | } 23 | 24 | public static PreferenceHelper instance(Context context) { 25 | if (helper == null) { 26 | helper = new PreferenceHelper(context); 27 | } 28 | return helper; 29 | } 30 | 31 | public void saveUser(String json) { 32 | JSONObject jsonObject = null; 33 | BeanManager.cleanUser(context); 34 | try { 35 | jsonObject = new JSONObject(json); 36 | preference.putString(Preference.SX_USER, jsonObject.getString("sxAcount")); 37 | preference.putString(Preference.SESSION_ID, jsonObject.has("sessionId") ? jsonObject.getString("sessionId") : ""); 38 | preference.putBoolean(Preference.AUTO_GET_PASSWORD, false); 39 | } catch (JSONException e) { 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/cn/mandroid/wtshanxun/UI/dialog/NoticeDialog.java: -------------------------------------------------------------------------------- 1 | package cn.mandroid.wtshanxun.UI.dialog; 2 | 3 | import android.app.Dialog; 4 | import android.content.Context; 5 | import android.view.View; 6 | import android.widget.Button; 7 | import android.widget.TextView; 8 | 9 | import cn.mandroid.wtshanxun.R; 10 | 11 | /** 12 | * Created by Administrator on 2015-09-22. 13 | */ 14 | public class NoticeDialog extends SuperDialog implements View.OnClickListener { 15 | private Context context; 16 | private TextView titleText; 17 | private TextView contentText; 18 | private Button submit; 19 | 20 | public NoticeDialog(Context context, String title, String content) { 21 | super(context, R.style.MyDialog); 22 | setContentView(R.layout.doalog_notice); 23 | this.context = context; 24 | contentText = (TextView) findViewById(R.id.contentText); 25 | titleText = (TextView) findViewById(R.id.titleText); 26 | submit = (Button) findViewById(R.id.submit); 27 | submit.setOnClickListener(this); 28 | setContent(content); 29 | setTitle(title); 30 | } 31 | public void setTitle(String title) { 32 | titleText.setText(title); 33 | } 34 | 35 | public void setContent(String content) { 36 | contentText.setText(content); 37 | 38 | } 39 | 40 | @Override 41 | public void onClick(View view) { 42 | switch (view.getId()) { 43 | case R.id.submit: 44 | cancel(); 45 | break; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/res/layout/notification_heart.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 16 | 21 | 22 | 29 | 30 | 35 | 36 | 37 | 38 | 39 |