2014-03-31 44 views
0

有什麼辦法來處理應用程序提升網絡信號中的不良信號問題? isee appp在像https://play.google.com/store/apps/details?id=com.bosscellular.curtishttps://play.google.com/store/apps/details?id=com.alportela.apptoola.network_booster這樣的遊戲商店,但不知道他們如何工作如何提高信號progeamically任何人知道?下面是我的代碼,它只返回網絡強度,但我想提升信號強度,我該怎麼做?如何處理應用程序或提升信號中的不良信號問題

private static final int EXCELLENT_LEVEL = 51; 
private static final int GOOD_LEVEL = 50; 



ProgressBar progressBar; 
TextView textView; 

@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.main); 
    progressBar = (ProgressBar) findViewById(R.id.signalLevel); 
    textView = (TextView) findViewById(R.id.signalLevelInfo); 
Toast.makeText(getApplication(), "Please try again \n Your Connection Signal are Low",  
      Toast.LENGTH_SHORT).show(); 

    startSignalLevelListener(); 

} 





private void setSignalLevel(int level) { 
    int progress = (int) ((((float) level)/31.0) * 100); 
    String signalLevelString = getSignalLevelString(progress); 

    progressBar.setProgress(progress); 

    textView.setText(signalLevelString); 

    Log.i("signalLevel ", "" + progress); 
} 

private String getSignalLevelString(int level) { 
    String signalLevelString = "Weak"; 

    if (level >= EXCELLENT_LEVEL) 
    { 
     signalLevelString = "High"; 
    progressBar.getProgressDrawable().setColorFilter(Color.GREEN, Mode.OVERLAY); 
    } 

    else if (level <= GOOD_LEVEL) 
    { 
     signalLevelString = "Weak"; 
     progressBar.getProgressDrawable().setColorFilter(Color.RED, Mode.OVERLAY); 

    } 


    return signalLevelString; 
} 

private void stopListening() { 
    TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); 

    tm.listen(phoneStateListener, PhoneStateListener.LISTEN_NONE); 
} 


private void startSignalLevelListener() { 
    TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); 
    int events = PhoneStateListener.LISTEN_SIGNAL_STRENGTH 
      | PhoneStateListener.LISTEN_DATA_ACTIVITY | 

      PhoneStateListener.LISTEN_DATA_CONNECTION_STATE | 

      PhoneStateListener.LISTEN_SERVICE_STATE; 

    tm.listen(phoneStateListener, events); 
} 

private final PhoneStateListener phoneStateListener = new PhoneStateListener() { 



    @Override 
    public void onSignalStrengthChanged(int asu) { 


     setSignalLevel(asu); 

     super.onSignalStrengthChanged(asu); 
    } 
}; 

回答

0

你不能通過軟件真正提高你的信號強度;它取決於許多遠遠超出軟件應用的變量 - 包括無線固件,設備硬件,無線站點附近,無線電干擾和環境因素。

您引用的應用程序似乎只是打開和關閉飛行模式,這會迫使設備立即重新掃描新連接。這些應用程序產生的任何「信號增強」是因爲設備在重新激活移動無線電時找到了更強的信號(可能通過連接到不同的無線站點)。