Bluestacks 的最新更新是每 2 秒从端口 10505 发送一次网络广播。
Beacon-v1|pcName|WindowsPC OpenSensor-v2|54321
至 IP 255.255.255.255
以前的版本没有发生这种情况。这是一些等待与另一台设备通话的自动同步通知吗?我不希望 bluestacks 与其他联网设备交谈,除非我告诉它这样做。我还没有检查或同意任何说它需要这样的网络广播的东西。
即使它只有 53 个字节,对我来说仍然是网络污染。我怎么能把它关掉,直到我真正想要它?谢谢
package com.example.test5;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DBAdapter {
private static final String TAG = "DBAdapter";
private static final String DATABASE_NAME = "TestDB"; //Database Name 'TestDB'
private static final int DATABASE_VERSION =1; //Change Version to upgrade db
private final Context context;
private DatabaseHelper DBHelper;
private SQLiteDatabase db;
public DBAdapter(Context ctx)
{
this.context = ctx;
DBHelper = new DatabaseHelper(context);
}
private static class DatabaseHelper extends SQLiteOpenHelper
{
DatabaseHelper(Context context)
{
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db)
{
db.execSQL("create table USER(Id INTEGER NOT NULL PRIMARY KEY,USER_ID TEXT NOT NULL,USER_NAME TEXT NOT NULL,PASSWORD TEXT NOT NULL, ACTIVE_YN TEXT NOT NULL default 'Y')");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion,
int newVersion)
{
db.execSQL("DROP TABLE IF EXISTS USER");
onCreate(db);
}
}
//---opens the database---
public DBAdapter open() throws SQLException
{
db = DBHelper.getWritableDatabase();
return this;
}
//---closes the database---
public void close()
{
DBHelper.close();
}
//---insert a User into the database---
public void insertUser(String USER_ID,String USER_NAME,String PASSWORD)
{
ContentValues initialValues = new ContentValues();
initialValues.put("USER_ID", USER_ID);
initialValues.put("USER_NAME", USER_NAME);
initialValues.put("PASSWORD", PASSWORD);
db.insert("USER", null, initialValues);
}
//---updates
public boolean updateUserStatusById(String USER_NAME,String USER_ID )
{
ContentValues args = new ContentValues();
args.put("USER_NAME", USER_NAME);
return db.update("USER", args,
"USER_ID='" + USER_ID+"'", null) > 0;
}
//executing query and it returns fields which are specified in the query ..........
public Cursor getQueryResult(String MY_QUERY) throws SQLException
{
return db.rawQuery(MY_QUERY, null);
}
}
南达基肖尔 P