Coder Social home page Coder Social logo

djun100 / android-switch-env Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trinea/android-switch-env

0.0 2.0 0.0 736 KB

Android development tool which can be used for switching between test enviroment and online enviroment

License: Apache License 2.0

Java 100.00%

android-switch-env's Introduction

Android 开发测试环境切换工具

一年前周末花半天写的,用着没太多其他需求就没怎么改进,现在源码开放出来,需要的话可以提交 Request 添加更复杂需求
原理介绍:Android 开发测试环境切换工具

1. 功能介绍

现在大多开发人员都是通过程序中 isDebug 变量表示是否是 Debug 模式,从而确定后台服务器是接入测试环境还是开发环境

那么如果没有程序代码呢?如果是已上线某个老版本呢?

这个项目的主要功能是修改 Host 文件,从而达到将对线上环境的访问全部指向到测试环境的目的
PS:手机必须开启了 Root 权限

screenshot

2. 如何设置

在 SD 卡根目录下 Trinea 文件夹内新建文件 switch-env-host.txt,内容为测试环境和开发环境对应的 Host
在 SD 卡根目录下 Trinea 文件夹内新建文件 switch-env-app-info.txt,内容为 App 信息,每行信息为包名 空格 应用名

android-switch-env's People

Contributors

trinea avatar

Watchers

承影 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.