Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class aSyncTask extends AsyncTask<Void,Void,Void> {
- @Override
- protected Void doInBackground(Void...params) {
- MainActivity.ssh();
- try{
- while(isCancelled()!=true) {
- if (System.in.available() >= 0) {
- publishProgress();
- }
- }}
- catch(IOException e){Log.e("log", e.getMessage());}
- return null;
- }
- protected void onProgressUpdate(Void...params){
- MainActivity.h.sendEmptyMessage(0);
- //byte[] bt = new byte[100];
- //try{
- //System.out.write(bt);
- //Log.d("log",bt.toString());
- //}
- //catch(IOException e){Log.e("log",e.getMessage());}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement