[Video] basic learning-free Android development: Bluetooth chat room APP (4), androidapp
Zero basic learning Android development: Bluetooth chat room APP Lecture 4
4.1 Use of the ListView Control4.2 BaseAdapter details4.3 ListView distribution and rolling events4.4 ListView event listener: OnItemClickedListener
scanningGetactivity (). Runonuithread (NewRunnable () {//ui The control of a thread changes state, this method needs to be called, or it may not be valid @Override Public void Run() {T.showshort (Getactivity (), getString (r.string.sign_in_success)); Appsettings.setprefstring (Getactivity (), Config.issignin, mcurrentdate); Setbuttonstate (); Dialogutils.progone ();//Mcontrol.clo
0 Fundamentals of Android development: Bluetooth chat room app first talk1. Android Introduction and Environment building: the most efficient Android learning in history1.1 Google's size strategy1.2 Internet of Things and cloud computing1.3 Intelligent XX Equipment1.4 Android Development Prospects1.5 Android Enterprise demand and employment pay1.6 Android Framewo
(extra_device_address, ADDRESS); //Set result and finish this ActivitySetresult (ACTIVITY.RESULT_OK, intent); Finish (); }Go back to the last Aty deal: Private void Boolean secure) { // Get The device MAC address String address = Data.getextras (). getString (devicelistactivity.extra_device_address); Get the Bluetoothdevice object bluetoothdevice device = mbluetoothadapter.getremotedevice (address); // attempt to connect to the device mchat
In the developed app we usually bring up the settings page for WiFi, Bluetooth, airplane mode, etc. by manually sliding the bottom up. Sometimes we develop apps that can't be paged out.The workaround:Go to iphone "Settings"--"control center"--"in-app access" switch to open it!"Re-lock Screen" is in the lock screen case, agree to call the settingsiOS development in the bottom of the app slide can not be reca
; } //Do work to manage the connection (in a separate thread)Manageconnectedsocket (Mmsocket); } /**Would cancel an in-progress connection, and close the socket*/ Public voidCancel () {Try{mmsocket.close (); } Catch(IOException e) {} }}Notice that's cancelDiscovery() called before the connection is made. You should always does this before connecting and it's safe to call without actually checking whether it's running or not Want to check, call isDiscovering() ).manageConnectedSoc
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.