今早收到上一封邮件 英文这样的邮件,说我的账号被举报将要冻结,但是我没有发任

后使用快捷导航没有帐号?
其他登录方式
查看: 33229|回复: 2
在线时间9 小时最后登录阅读权限15UID注册时间积分89精华0
, 积分 89, 距离下一级还需 11 积分
主题帖子 金币355 元 智豆33 点
无论怎么鼓捣都成功不了,唉………无奈了,有没有大神知道怎么解决?
在线时间58 小时最后登录阅读权限20UID7855197注册时间积分204精华0
, 积分 204, 距离下一级还需 196 积分
主题帖子 金币1041 元 智豆1 点
下载360手机卫士,可以开启流量悬浮窗
在线时间249 小时最后登录阅读权限20UID3778863注册时间积分418精华0
, 积分 418, 距离下一级还需 282 积分
主题帖子 金币600 元 智豆4 点
下载安装一个APP &网速监测1.3.apk& ,把它的显示放到状态栏上,设置为保护的应用程序(以免被杀掉进程)
祝大家鸡年大吉!智友准备了共28份大礼!查看: 29872|回复: 8
发一个悬浮窗软件,时时刻刻看网速,跟电脑上的360流量监控悬浮窗一个意思,需要的拿
下了很多看流量的,都是要调到某个页面才能看,这个不需要,即使是在全屏游戏时也能看到流量走动情况,显示已用流量和实时网速,自己一直在用,很好用很实用,可以调节透明度,颜色,以及模式,不想时时刻刻看到他的话,调为来电模式,就会只有在数据交换的时候才会出现,图就不上了,下着试试吧,又不大,不喜欢删掉就是了!
(596.45 KB, 下载次数: 19741)
12:44 上传
点击文件名下载附件
没人要吗?自沙
呵呵,不如直接用360不就好了,呵
来电通的监控很完善的,也有悬浮窗
来电通,360之类的都有这功能吧……
本帖最后由 际十一 于
13:36 编辑
360有悬浮窗吗,我指不要进入任何界面就能看到,没找到啊
360没有悬浮窗吧
来电通,我看看
楼主真执着啊,悬浮窗有什么用啊,还影响美观,反正我用WIFI从来不看流量,用GPRS一会就关。
Powered by一个简单的网速显示悬浮窗_Android_第七城市
一个简单的网速显示悬浮窗
2016转眼就要过去了,刚刚参加完学院举办的元旦晚会,看了看系里的大牛的各种事迹,内心感慨万分。回来继续安心做我的小码农,顺便更一下将近一个月没有更新的博客。这次带来的是一个悬浮窗网速显示计,先看下效果:demo这里主要是在桌面上显示一个悬浮窗,利用了WindowManager以及Service,接下来看看如何实现这样一个效果:首先APP必须获得在桌面上显示悬浮窗的机会,很多第三方ROM都限制了这一权限,我们首先就是要申请改权限,代码如下:public boolean checkDrawOverlayPermission() {
if (!Settings.canDrawOverlays(this)) {
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + getPackageName()));
startActivityForResult(intent, REQUEST_CODE);
}该函数首先检查APP是否有显示悬浮窗的权限,如果没有,就跳转到该APP设置悬浮窗权限的界面,如下图所示:然后先编写我们的悬浮窗,布局很简单,就是两个TextView:&?xml version="1.0" encoding="utf-8"?&&RelativeLayout xmlns:android="/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#"&
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:id="@+id/speed_up"
android:text="upload speed"
android:gravity="left"
android:textSize="10dp"
android:layout_centerHorizontal="true"
android:textColor="@android:color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content" /&
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:id="@+id/speed_down"
android:layout_below="@id/speed_up"
android:text="download speed"
android:gravity="left"
android:textSize="10dp"
android:layout_centerHorizontal="true"
android:textColor="@android:color/white"
android:layout_width="wrap_content"
android:layout_height="wrap_content" /&&/RelativeLayout&SpeedView:public class SpeedView extends FrameLayout {
private Context mC
public TextView downT
public TextView upT
private WindowManager windowM
private int statusBarH
private float preX,preY,x,y;
public SpeedView(Context context) {
super(context);
private void init() {
statusBarHeight=WindowUtil.statusBarH
windowManager= (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
//a view inflate itself, that's funny
inflate(mContext,R.layout.speed_layout,this);
downText= (TextView) findViewById(R.id.speed_down);
upText= (TextView) findViewById(R.id.speed_up);
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()){
case MotionEvent.ACTION_DOWN:
preX=event.getRawX();preY=event.getRawY()-statusBarH
case MotionEvent.ACTION_MOVE:
x=event.getRawX();y=event.getRawY()-statusBarH
WindowManager.LayoutParams params= (WindowManager.LayoutParams) getLayoutParams();
params.x+=x-preX;
params.y+=y-preY;
windowManager.updateViewLayout(this,params);
preX=x;preY=y;
return super.onTouchEvent(event);
}在SpeedView里我们重写了onTouchEvent事件,这样就能响应我们的拖拽事件了,注意这里更新SpeedView的位置是通过改变WindowManager.LayoutParam的x和y来实现的,调用windowManager.updateViewLayout(this,params)来更新位置。因为我们的网速显示悬浮窗要脱离于Activity的生命周期而独立存在,因此需要通过Service来实现:public class SpeedCalculationService extends Service {
private WindowUtil windowU
private boolean changed=
public void onCreate() {
super.onCreate();
WindowUtil.initX= (int) SharedPreferencesUtils.getFromSpfs(this,INIT_X,0);
WindowUtil.initY= (int) SharedPreferencesUtils.getFromSpfs(this,INIT_Y,0);
windowUtil=new WindowUtil(this);
public int onStartCommand(Intent intent, int flags, int startId) {
changed=intent.getBooleanExtra(MainActivity.CHANGED,false);
if(changed){
windowUtil.onSettingChanged();
if(!windowUtil.isShowing()){
windowUtil.showSpeedView();
SharedPreferencesUtils.putToSpfs(this,MainActivity.IS_SHOWN,true);
//return super.onStartCommand(intent, flags, startId);
return START_STICKY;
public IBinder onBind(Intent intent) {
public void onDestroy() {
super.onDestroy();
WindowManager.LayoutParams params= (WindowManager.LayoutParams) windowUtil.speedView.getLayoutParams();
SharedPreferencesUtils.putToSpfs(this, INIT_X,params.x);
SharedPreferencesUtils.putToSpfs(this, INIT_Y,params.y);
if(windowUtil.isShowing()){
windowUtil.closeSpeedView();
SharedPreferencesUtils.putToSpfs(this,MainActivity.IS_SHOWN,false);
Log.d("yjw","service destroy");
}}这里的WindowUtil其实就是一个工具类,帮助我们控制悬浮窗SpeedView的显示与隐藏:public class WindowUtil {
public static int statusBarHeight=0;
//记录悬浮窗的位置
public static int initX,initY;
private WindowManager windowM
public SpeedView speedV
private WindowManager.LayoutP
public boolean isShowing() {
return isS
private boolean isShowing=
public static final int INTERVAL=2000;
private long preRxBytes,preSeB
private long rxBytes,seB
private Handler handler=new Handler(){
public void dispatchMessage(Message msg) {
super.dispatchMessage(msg);
calculateNetSpeed();
sendEmptyMessageDelayed(0,INTERVAL);
public void onSettingChanged(){
String setting= (String) SharedPreferencesUtils.getFromSpfs(context,MainActivity.SETTING,MainActivity.BOTH);
if(setting.equals(MainActivity.BOTH)){
speedView.upText.setVisibility(View.VISIBLE);
speedView.downText.setVisibility(View.VISIBLE);
}else if(setting.equals(MainActivity.UP)){
speedView.upText.setVisibility(View.VISIBLE);
speedView.downText.setVisibility(View.GONE);
speedView.upText.setVisibility(View.GONE);
speedView.downText.setVisibility(View.VISIBLE);
private void calculateNetSpeed() {
rxBytes=TrafficStats.getTotalRxBytes();
seBytes=TrafficStats.getTotalTxBytes()-rxB
double downloadSpeed=(rxBytes-preRxBytes)/2;
double uploadSpeed=(seBytes-preSeBytes)/2;
preRxBytes=rxB
preSeBytes=seB
//根据范围决定显示单位
String upSpeed=
String downSpeed=
NumberFormat df= java.text.NumberFormat.getNumberInstance();
df.setMaximumFractionDigits(2);
if(downloadSpeed&){
downloadSpeed/=();
downSpeed=df.format(downloadSpeed)+"MB/s";
}else if(downloadSpeed&1024){
downloadSpeed/=(1024);
downSpeed=df.format(downloadSpeed)+"B/s";
downSpeed=df.format(downloadSpeed)+"B/s";
if(uploadSpeed&){
uploadSpeed/=();
upSpeed=df.format(uploadSpeed)+"MB/s";
}else if(uploadSpeed&1024){
uploadSpeed/=(1024);
upSpeed=df.format(uploadSpeed)+"kB/s";
upSpeed=df.format(uploadSpeed)+"B/s";
updateSpeed("↓ "+downSpeed,"↑ "+upSpeed);
public WindowUtil(Context context) {
this.context =
windowManager= (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
speedView=new SpeedView(context);
params=new WindowManager.LayoutParams();
params=new WindowManager.LayoutParams();
params.x=initX;
params.y=initY;
params.width=params.height=WindowManager.LayoutParams.WRAP_CONTENT;
params.type=WindowManager.LayoutParams.TYPE_PHONE;
params.gravity= Gravity.LEFT|Gravity.TOP;
params.format= PixelFormat.RGBA_8888;
params.flags=WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
//设置悬浮窗可以拖拽至状态栏的位置//
| WindowManager.LayoutParams.FLAG_FULLSCREEN| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
public void showSpeedView(){
windowManager.addView(speedView,params);
isShowing=
preRxBytes= TrafficStats.getTotalRxBytes();
preSeBytes=TrafficStats.getTotalTxBytes()-preRxB
handler.sendEmptyMessage(0);
public void closeSpeedView(){
windowManager.removeView(speedView);
isShowing=
public void updateSpeed(String downSpeed,String upSpeed){
speedView.upText.setText(upSpeed);
speedView.downText.setText(downSpeed);
}}WindowUtil类中也包含了一个很重要的方法,那就是计算网速。这里计算网速的方法很简单,Android提供了一个类TrafficStats,这个类里面为我们提供了好多接口,我们用到了其中的两个:1.public static long getTotalTxBytes ()Return number of bytes transmitted since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage.2.public static long getTotalRxPackets ()Return number of packets received since device boot. Counts packets across all network interfaces, and always increases monotonically since device boot. Statistics are measured at the network layer, so they include both TCP and UDP usage.可以看出,getTotalTxBytes()方法返回系统自开机到现在为止所一共传输的数据的字节数,包括上传的数据和下载的数据;而getTotalRxPackets()方法返回的是系统自开机到现在为止所一共接收到也就是下载的数据的字节数,用getTotalTxBytes()-getTotalRxPackets()自然就是系统开机到现在为止所上传的数据的字节数。这样每隔一定时间,我们计算一下系统自开机到目前所接受的数据包的字节数和所发送的数据的字节数的变化量,用变化量除以时间,就是这段时间的平均网速了。为了每个一段时间计算一下网速,我们利用了一个Handler来实现这个定时任务private Handler handler=new Handler(){
public void dispatchMessage(Message msg) {
super.dispatchMessage(msg);
calculateNetSpeed();
sendEmptyMessageDelayed(0,INTERVAL);
};这里要注意将SpeedView添加到屏幕上,也就是添加到WindowManager里的时候,这个WindowManager.LayoutParams十分重要,其参数都是有用的,这里就不细讲了,详细介绍请移步官方文档.最后要将我们的悬浮窗设置为开机自启动的,利用一个BroadcastReceiver就可以了:public class MyBroadcastReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
Log.d("yjw","receiver receive boot broadcast");
boolean isShown= (boolean) SharedPreferencesUtils.getFromSpfs(context,MainActivity.IS_SHOWN,false);
if(isShown){
context.startService(new Intent(context,SpeedCalculationService.class));
}}在Manifest里这样注册我们的BroadcastReceiver: &receiver android:name="me.mrrobot97.netspeed.MyBroadcastReceiver"&
&intent-filter&
&action android:name="android.intent.action.BOOT_COMPLETED" /&
&category android:name="android.intent.category.HOME" /&
&/intent-filter&
&/receiver&这样当系统启动完成,就会开启我们的Service。注意这里&intent-filter&中的&category&不可省略,亲测省略后BroadcastReceiver无法接收到系统广播。最后还有一点,在Manifest的MainActivity条目中加一个属性:android:excludeFromRecents="true"这样我们的ManiActivity就不会显示在最近任务列表,防止用户清空任务列表时将我们的Sercvice进程终结了。完整的项目地址Github
最新教程周点击榜
微信扫一扫1232人阅读
Android悬浮图标(2)
前几天想做一个类似于360流量监控悬浮窗的效果,可以实时显示网速。
重要的读取系统的流量文件,文件路径/proc/self/net/dev
下面是复制下来的dev文件
Inter-| & Receive & & & & & & & & & & & & & & & & & & & & & & & &| &Transmit
&face |bytes & &packets errs drop fifo frame compressed multicast|bytes & &packets errs drop fifo colls carrier compressed
& & lo: & &5200 & & &48 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & 5200 & & &48 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
dummy0: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
& 45920 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 &4447114 & 39247 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
rmnet1: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
rmnet2: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
rmnet3: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
rmnet4: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
rmnet5: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
rmnet6: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
rmnet7: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
& usb0: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
&tunl0: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
& sit0: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
ip6tnl0: & & & 0 & & & 0 & &0 & &0 & &0 & & 0 & & & & &0 & & & & 0 & & & &0 & & & 0 & &0 & &0 & &0 & & 0 & & & 0 & & & & &0
其中/eth是以太网信息 tiwlan0 是 Wifi &rmnet0 是 GPRS
当然,对于不同的机型,文件格式也可能不相同,可自行下载ES文件浏览器查看,并不在sd卡中,在根目录下。
下面我们就来看看是怎么读取跟显示的
首先是悬浮窗,布局文件如下:
然后是自定义的悬浮窗显示,位置可移动,单击会出现关闭悬浮窗按钮
代码如下:
最后,最主要的获取网速,本来写的每秒读取一次系统流量文件,但频繁的读取会浪费系统资源,所以改成了一段时间后在读取,可根据个人需要修改,在代码中有标注,注释很清楚。
下面看看代码:
有需要的也可以下载源码看看
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:770341次
积分:10710
积分:10710
排名:第1180名
原创:55篇
转载:1490篇
评论:65条
(7)(51)(20)(3)(7)(15)(13)(2)(10)(28)(34)(6)(74)(7)(4)(4)(8)(11)(7)(10)(5)(9)(10)(4)(22)(10)(9)(27)(15)(33)(51)(45)(13)(87)(18)(41)(38)(129)(10)(17)(9)(16)(73)(55)(53)(55)(17)(106)(55)(52)(29)(53)(1)(15)(53)网速悬浮窗|网速悬浮窗安卓版V 1.2安卓版_未来软件园
手机版,更便捷!
当前位置: >
> 网速悬浮窗安卓版V 1.2安卓版
网速悬浮窗这是一款很好用的小软件,虽然体积只有一点点,但是你可以实时查看自己的网速,再也不远担心流量跑得太疯狂了.网速悬浮窗介绍网速悬浮窗可以在屏幕的任意位置显示当前网速.更新日志网速悬浮窗 v1.2安卓版Acker好久没有更新这个APP了,因为Acker在写毕业论文,但是Acker昨天得知自己被老板延期了,所以Acker今天更新了#界面微调,性能,网速更加准确#迫于舆论压力,减小了悬浮窗文字大小#增加了开机自启设置项
随着手机拍照功能的越来越强大,我们手机里堆积的照片也愈来愈多。这时候大家就可以下载一款手机相册软件,用户可以制作自己专属相册的同时也能更好地管理自己的相册。那么相册制作app哪个好用,手机相册软件哪个好?今天小编就为大家推荐一些不错的手机软件,包括云相册、时光相册、动感相册、相册制作软件、qq相册密码破解版等等,支持免费下载,随便哪一款都非常好用!
类型:  语言:简体中文
大小:1.86MB
尖兵手机修改器是一款运行在安卓平台上的手机系统修改软件,尖兵手机修改器功能强大,无需重启手机即可实...
类型:  语言:简体中文
大小:3.6 MB
抢红包神器5手机版是一款运行在安卓平台上的抢红包神器,抢红包神器5手机版各种红包随时秒抢,权威认证,绿...
类型:  语言:简体中文
大小:1.9 MB
条码制作器是一款运行在安卓平台上的条形码二维码制作软件,条码制作器支持数十种相关条形码,条形码标签...
类型:  语言:简体中文
大小:4.2 MB
红人神器破解版是一款运行在安卓平台上的qq空间秒赞软件,红人神器破解版帮你互刷人气,指定说说刷赞,定时...
类型:语言:简体中文
大小:3.3 MBMB
免费抢红包是一款运行在安卓平台上的手机抢红包辅助软件,你通过设置好本软件后软件即可帮你自动抢微信红包。这样你再也不会落下任何一个红...
类型:语言:简体中文
大小:3.7 MBMB
替换是一款运行在安卓平台上的手机应用小助手,很多人都会被一堆app烦恼,那么你就真的需要用到替换app了。替换app,随你的随心所欲,让你的手...
类型:语言:简体中文
大小:3.7 MBMB
FTP管理器是一款运行在安卓平台上的手机FTP管理软件,用户可以随时使用手机管理查看FTP服务器,为用户管理FTP服务器提供方便快捷的方法,是一...
类型:语言:简体中文
大小:6.8 MBMB
天谕是一款运行在安卓平台上的天谕游戏辅助手机软件,为用户带来各种天谕的游戏攻略装备查看等等功能,更有游戏最新动态和壁纸等功能,是天谕...
★★★★★
本类推荐排行
版本:v2.2最新安卓版大小:819 KB
版本:v2.3.3最新版大小:11.3MB
版本:v1.9.1手机版大小:11.58MB
版本:v1.2.1最新官方版大小:1.07MB
版本:v1.0.5安卓版大小:8.1 MB
版本:v4.9u3最新官方版大小:3.91MB
版本:v1.2 官方版大小:1.4 MB
版本:v1.5.1安卓版大小:2.3 MB
版本:v3.5.1.46官方最新版大小:13.11MB
版本:V4.4.1 VIP特别版本大小:8.45 MB
版本:v3.1安卓版大小:1.9 MB
版本:安卓版v2.9.9官方版大小:440 KB
版本:最新版安卓版大小:1.6 MB
版本:v9.9.9最新安卓版大小:959 KB
版本:v5.4安卓版大小:7.3 MB}

我要回帖

更多关于 邮箱重复收到一封邮件 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信