# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
没有合适的资源?快使用搜索试试~ 我知道了~
判断是否有效的可以用网络
共47个文件
class:15个
xml:9个
png:9个
需积分: 10 9 下载量 105 浏览量
2013-10-28
22:10:56
上传
评论
收藏 1012KB ZIP 举报
温馨提示
公司有个内网是专门测试平板的,但没有实践的网络,访问网站是不能的,当用内网去测访问WEBservice 的时候就会在那卡住20多秒,这个用户体验就很不好了,还有另一种情况也是没有实际的网络,那就是电信开放出来的一个热点,要用那你必须得有账号、密码。 大概的思路:开一个总的线程管理一个判断某个URL是否有效的,在里面用的是http://www.baidu.com测试,另一个是开个3秒线程[3秒也就是超时时间],如果有可用网络的话,线程1会在3秒内执行完成,也就是线程1会比线程2改变值来的快,等线程1执行完,线程2也回去改变值,这样就得注意,要判断值是否改变。 如果不可用的话:线程1会一直卡在哪里20多秒,线程2会只执行3秒,这时候线程2就会比线程1改变值来的快,到20以后线程1也会去改变值,这时候也得注意,要判断值是否改变,3秒过去就提示说这个网络是不可用的。
资源推荐
资源详情
资源评论
收起资源包目录
.zip (47个子文件)
net
bin
classes.dex 577KB
res
drawable-hdpi
ic_launcher.png 6KB
drawable-xhdpi
ic_launcher.png 9KB
drawable-xxhdpi
ic_launcher.png 17KB
drawable-mdpi
ic_launcher.png 3KB
net.apk 194KB
jarlist.cache 119B
dexedLibs
annotations-77a0f69feadf6e82475cf8b8c81a2696.jar 943B
android-support-v4-5a49d6072c07fe0136ae8378309a809a.jar 148KB
classes
com
example
net
MainActivity.class 4KB
BuildConfig.class 339B
MainActivity$3.class 2KB
MainActivity$2.class 746B
MainActivity$1.class 1KB
R$layout.class 394B
R$id.class 419B
R$drawable.class 398B
R$dimen.class 452B
R$attr.class 331B
R$menu.class 379B
R.class 643B
MainActivity$4.class 915B
R$string.class 463B
R$style.class 422B
resources.ap_ 40KB
AndroidManifest.xml 1KB
res
drawable-ldpi
menu
main.xml 261B
drawable-hdpi
ic_launcher.png 7KB
drawable-xhdpi
ic_launcher.png 12KB
drawable-xxhdpi
ic_launcher.png 24KB
values
strings.xml 218B
styles.xml 695B
dimens.xml 218B
values-sw720dp-land
dimens.xml 275B
drawable-mdpi
ic_launcher.png 4KB
values-sw600dp
dimens.xml 201B
layout
activity_main.xml 534B
proguard-project.txt 781B
ic_launcher-web.png 50KB
assets
gen
com
example
net
BuildConfig.java 157B
R.java 2KB
src
com
example
net
MainActivity.java 5KB
.project 839B
.classpath 364B
project.properties 563B
AndroidManifest.xml 1KB
libs
android-support-v4.jar 384KB
共 47 条
- 1
资源评论
laose307
- 粉丝: 4
- 资源: 22
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功