android与golang的http请求


见 Guishi_shoper 的RegisterActivity

短信验证调试 手机与电脑后台需在同一局域网 必须在同一个局域网
private 注册所有控件
private static final String TAG = "RegisterActivity";   //调试logcat 的info模式输入 RegisterActivity 以便注册调试

简单思路:安卓http给后台发请求短信验证,然后后台给阿里发送短信验证请求,阿里接到请求后,先给后台服务器返回请求,其中包括短信验证码,
再将一份短信验证码发送给用户的手机号,用户将得到的短信验证输入到验证码输入框,与服务器得到的短信验证相互核对,相同则通过,不同则跳到相应的处理方法

//http库
compile 'com.kymjs.rxvolley:rxvolley:2.0.0'
// If use okhttp function
compile 'com.kymjs.rxvolley:okhttp:1.1.4'
//or
compile 'com.kymjs.rxvolley:okhttp3:1.1.4'
build.gradle(Project)
allprojects {
repositories {
加入
 google()
jcenter()
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }

}
}

猜你喜欢

转载自www.cnblogs.com/acg88688/p/9379902.html