Android Open Source - TuxRemote My User Info

From Project

Back to project page TuxRemote.


The source code is released under:

GNU General Public License

If you think the Android project TuxRemote listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

//from   www.j  av a2 s . c om
import android.widget.Toast;

import com.jcraft.jsch.UserInfo;

public class MyUserInfo implements UserInfo{
    public String getPassword(){ return passwd; }
    public boolean promptYesNo(String str){
      return true;
    String passwd;

    public String getPassphrase(){ return null; }
    public boolean promptPassphrase(String message){ return true; }
    public boolean promptPassword(String message){
//      Object[] ob={passwordField};
//      int result=
//          JOptionPane.showConfirmDialog(null, ob, message,
//              JOptionPane.OK_CANCEL_OPTION);
//      if(result==JOptionPane.OK_OPTION){
//        passwd=passwordField.getText();
//        return true;
//      }
//      else{
//        return false;
//      }
            return false;
    public void showMessage(String message){
            Toast.makeText(Global.getStaticContext(), message, Toast.LENGTH_LONG).show();


Java Source Code List