Android handler transmits messages. androidhandler
When a worker thread sends a message to the main thread, because the main thread has logoff, it does not need to initialize logoff. Pay attention to the handler associated with the sender of the message, in this case, handler of the main thread is used.
Handler will send messages to the MessageQueue queue, and
a keyCipher.init (Cipher.decrypt_mode, SecureKey, SR); //now, get the data and decrypt//formally perform decryption operations returncipher.dofinal (SRC); } /*** BASE64 Code * *@paramInfo *@return */ Public StaticString Base64Encode (byte[] info) { returnbase64.encodebase64string (info); } /*** BASE64 Decoding * * *@paramInfo *@return */ Public Static byte[] Base64decode (String info) {returnbase64.decodebase64 (info); } /*** The message body is first d
There are many merge contacts in Google account [email protected] with the same phone number in the contact, which results in the title and number of the group group (Phonebookindex), and the number of contacts in the search results list is not equal.Because the SQL statement that searches to the contact list is grouped by phone number, the same number is treated as a single line.Modify the Contactsprovider2.java file 2 places in the case Phone_email_filter branch:Case Phone_email_filter: {Setta
First, open the simulator.
Then, connect to the simulator
C: \ Users \ billgates> Telnet localhost 5554
Android Console: Type 'help' for a list of commandsOK
5554 indicates the port of the simulator on the local machine. You can use ADB devices to view the Port:
C: \ Users \ billgates> ADB Devices
List of devices attachedEmulator-5554 Device
Connect to the simulator and enter the HELP command to view help. Enter the command and press enter to view the
The following methods are all tested successfully:
1. Use commands to simulate
(1) simulate incoming calls
1. Open command line CMD and enter Telnet and press Enter.2. Enter o localhost 5554Press enter to connect to emulator.3. Enter GSM call 13656563636. If OK is displayed, the call is successful (the phone number can be specified at will)
(2) simulate text messages
1. Open command line CMD and enter Telnet and press Enter.2. Enter o localhost 5554 a
Android QQ messages are left slide to delete instances (SwipeListViewEX for optimization) and androidswipelayout
Sliding left to delete an item message instance like a QQ message
Source code reference: http://blog.csdn.net/gaolei1201/article/details/42677951
I made some adjustments myself, all the code:
Http://download.csdn.net/detail/jenson138/8490067
:
Only the following adapter classes are available:
Method UpdateNotification () in Package/apps/mms/src/com/android/mms/transaction/messagingnotification.java Add a sentence before the last line:....Notification.audiostreamtype = Audiomanage.stream_alarm; Add this sentenceNm.notify (notification_id, NOTIFICATION);}If the default sound value needs to be set for Android JB5, otherwise the sound default value of the notification service will be empty and no so
classMytestonclickoneextendsActivityImplementsOnclicklistener { - + PrivateContext con; - Publicmytestonclickone (Context con) { + This. con=con; A at } - - @Override - Public voidOnClick (View arg0) { - //build a toast that corresponds to the alert of the webpage. Maketext (Contextual context object, string string, showing the time of the delay); -Toast ts = Toast.maketext (Con, "Welcome to your presence!"), Toast.length_long); in ts.show ();/
This article is an essential knowledge for Android developers.1. Polling the serverGeneral application, the timing notification message can use the polling method to pick up messages from the server, of course, real-time message notification, recommend the use of push services.There is a need to pay attention to the polling frequency setting to balance demand and performance.2. Independent processesRegardle
In my previous articles, I wrote examples of real-time text message retrieval and text message (Session) deletion.
Related links:
SMS information Real-time acquisition: http://blog.csdn.net/etzmico/article/details/6860692
SMS (Session) Deletion: http://blog.csdn.net/etzmico/article/details/7077123
Therefore, the code for the above two methods will not be written in this article. You can click the link to view the code.
This time they are combined, but some small details need to be noted,
First,
Android development-based Worker thread sends messages to the Main thread
The Worker thread cannot modify the UI. Therefore, after receiving a message in the Worker thread, you must notify the main thread to update the UI.
The following is an example:
1 Layout
Code 2
private TextView textView; private Button button; private NetworkHandler handler_network; @Override pro
MMI Code Messages on Android
What is an MMI Code? An MMI Code is a sequence of digits that is entered into your phone to make it perform some special action.These codes start and end with a * or # so they don't get confused with phone numbers you might want to dial. They're usually only valid when you're not on a call, so if you key one in while connected to your cellphone company's IVR system they won't be
Sending text messages in Android is actually very simple. If you want to call the local text message system, you can use intent. The main code is as follows:
Uri uri = URI. parse ("smsto: 00000000000 ");
Intent it = new intent (intent. action_sendto, Uri );
It. putextra ("sms_body", "The smstext ");
Startactivity (it );
String body = "this is SMS Demo ";
Intent mmsintent = new intent (intent. action_sendt
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.