public class screencontrolactivity extends activity catch (socketexception e)
findbyids();
thread mreceivethread= new thread(mreceiverunnable);
mreceivethread.start();
}private void findbyids()
}}).start();
}});
clearbtn.setonclicklistener(new onclicklistener()
});ba = new myadapter();
handler = new handler()};}
public void search(string destip) catch (socketexception e) catch (ioexception e)
}public string getlocalipaddress() }}
} catch (socketexception ex)
return null;
}runnable mreceiverunnable = new runnable()
};
protected void startreceive() }}
}private void checkstbi***ist(stb stb)
} if(!isstbexist)
stbs.add(stb);
system.out.println("checkstbi***ist--->"+isstbexist);
}@override
public void onerror(int code, string desc)
});handler.sendemptymessagedelayed(1, 100);
} }
} catch (socketexception e) catch (ioexception e)
}class myadapter extends baseadapter
@override
public object getitem(int arg0)
@override
public long getitemid(int position)
@override
public view getview(int position, view convertview, viewgroup parent)
});pausebtn.setonclicklistener(new onclicklistener()
});stopbtn.setonclicklistener(new onclicklistener()
});voice.setonseekbarchangelistener(new onseekbarchangelistener()
@override
public void onstarttrackingtouch(seekbar seekbar)
@override
public void onprogresschanged(seekbar seekbar, int progress,
boolean fromuser)
});duration.setonseekbarchangelistener(new onseekbarchangelistener()
@override
public void onstarttrackingtouch(seekbar seekbar)
@override
public void onprogresschanged(seekbar seekbar, int progress,
boolean fromuser)
});return v;
}protected void volumechanged(string destip, int stbport, int taskno, string mip, int volume, int maxvol) catch (ioexception e)
}protected void duriationchanged(string destip, int stbport, int taskno, string mip,int pos) catch (ioexception e)
}protected void stop(string destip,int destport,int taskno, string mip) catch (ioexception e)
}protected void pause(string destip,int destport) catch (ioexception e)
}protected void play(string destip,int destport,string title, int duration, string url) catch (ioexception e) }}
}
控制螢幕亮度
要控制當前activity的亮度或者透明度,可以獲取當前的視窗,設定其屬性 window window getwindow layoutparams attributes window.getattributes attributes.screenbrightness 0.5 getwindow s...
控制手機螢幕
現以完成pc 與 android usb 的 socket 通訊 需要 pc 時時顯示螢幕 並控制手機螢幕 不知total control這類程式是 通過apk 時時抓圖 傳輸控制呢還是 向網上說的ip方式?ip 方式應該是wifi 環境下 那麼 usb環境下 是怎樣 實現的呢?知道的大大告訴下 通...
IOS螢幕旋轉控制
uiviewcontroller裡覆蓋如下方法 是否支援旋轉 bool shouldautorotate 支援哪些方向 uiinte ceorientationmask supportedinte ceorientations 旋轉時做的事 void willanimaterotationtoint...