This post focuses on some of the things that emoticons send.Reference: Android XMPP-based Instant Messaging 1-basic conversation1. Prepare the resource file.Using the emoji expression, I packed it,: http://files.cnblogs.com/files/pear-lemon/drawable.zip2. Expression layout file Layout_send_emotion.xmlXML version= "1.0" encoding= "Utf-8"?>Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/android
When we save the picture, we'll send a notification telling the system to sdcard it so that the other program will find it immediately. Intent intent = new Intent(); intent.setAction(Intent.ACTION_MEDIA_MOUNTED); intent.setData(Uri.fromFile(Environment .getExternalStorageDirectory())); sendBroadcast(intent);But to the Android4.4 is not the spirit of the media_mounted, Google will improve t
) { 2. Get input QQ number with password String QQ = Et_qqnumber.gettext (). toString (). Trim (); String password = Et_qqpassword.gettext (). toString (). Trim (); 3. Determine if the input gets content is empty, give the user prompt toast prompt, not empty to continue if (Textutils.isempty (QQ) | | Textutils.isempty (password)) {ToasT.maketext (Mainactivity.this, "QQ number or password can not be empty!") ", Toast.length_short). Sho
= R.string.crash_dialog_title, // optional. default is your application nameresDialogCommentPrompt = R.string.crash_dialog_comment_prompt, // optional. when defined, adds a user text field input with this text resource as a labelresDialogOkToast = R.string.crash_dialog_ok_toast // optional. displays a Toast message when the user accepts to send a report.)public class TestApplication extends Application{@Overridepublic void onCreate() {super.onCreate(
In accordance with the principles of Android handler detailed analysis we can know that when creating handle objects in the main thread, the main thread creates a loop object by default using the Threalocal function to bind the loop object and the main thread.Can we create a loop object and child thread bindings in a child thread that's actually possible?In this way we create a Looper object in the child thread, bind the Looper object and the child th
messing up, I simply sayParameter 1: Table nameParameter 2: Returns the column information contained in the data, with the column names in the string arrayParameter 3: Equivalent to the where,sql in the SQL where the content is written to this, for example: Tage>Parameter 4: What if you wrote in Parameter 3? (Do you know why I wrote Tagegt?), the one here is instead of? The value of the next example: New string[]Parameter 5: Group, do not explain, do not want to group to pass NULLParameter 6:ha
There are 3 places in the Linux system to save the traffic statistics files, for Android system also applies:(1) Under/proc/net/dev, you can view the incoming and outgoing traffic of each network interface (equivalent to adb shell Cat/proc/pid/net/dev,adbshell cat/sys/class/net/wlan0/statistics/rx _bytes)(2) Under/sys/class/net/, you can find a directory of related categories, such as wlan0. Statistics downstream rxbytes and Txbytes records in their s
Android emulator is already included in the GSM module, can analog phone and SMS debugging (do not spend too much money)First, the virtual machine must be turned on:EMULATOR-AVD Xxxxxx-scale 0.8These two parameters are needless to say, the first is the AVD name, and the second is the display size.Then use:telnet localhost Port is the virtual machine port number, typically 5554 (can be viewed using ADB devices)The complete notation is: telnet localhost
();} #endifTest.cpp Note that these two pieces of code are changed in the previous code, and some of the code is not related to this feature. Please delete it yourself.#include "test.h" #include "cocos2d.h" #include "platform/android/jni/jnihelper.h" #include ". /.. /.. /classes/jnitest.h "#include 3) C + + layervoid Helloworld::menuclosecallback (ref* psender) {#if (Cc_target_platform = = cc_platform_android)// Showtipdialog ("Exit", "exit,really
Android uses Gmail to send mail1. [Code]sendmail.javaPackage org.apache.android.mail;Import android.app.Activity;Import Android.os.Bundle;Import Android.util.Log;Import Android.view.View;Import Android.widget.Button;Import Android.widget.EditText;public class SendMail extends Activity {/*** Called with the activity is first created.*/@Overridepublic void OnCreate (Bundle icicle) {Super.oncreate (Icicle);Set
The code to send the message is as follows:Get Notification ManagerNotificationmanager Mnotificationmanager = (notificationmanager) getsystemservice (Context.notification_service);int icon = Android. R.drawable.stat_notify_chat;Long when = System.currenttimemillis ();Create a new notification that specifies its icon and captionNotification Notification = new Notification (icon, null, when);//The first param
This is my receive file code: Start can read to 1, but now it is not read, so add the red Word resolved (the code of the comment)File File =NewFile (Mfilepath, "Chetou.") +Entity.mediatype); if(!file.exists ()) file.createnewfile (); FileOutputStream Fos=NewFileOutputStream (file);//Save the received file to the corresponding path byte[] Sendbytes =New byte[1024]; intTranslen =0; LOG.V (TAG,"----Start receiving files ); while(true){ intRead =0; Read=Dis
"), NULL, "GB2312"Postmethod.getparams (). Setcontentcharset ("GB2312");
Multipartrequestentity MRP = new Multipartrequestentity (parts, Post.getparams ());Post.setrequestentity (MRP);
Execute POST methodHttpClient client = new HttpClient ();int code = Client.executemethod (POST);SYSTEM.OUT.PRINTLN (code);Catch ...}
The above code can successfully simulate the Java client to send a POST request, the server can also receive and save the fileM
1, if the button in the Mainactivity.java click on the settings:
Send data method Simple TypeI.putextra ("txt", "Yes, I just came from the message!");Send data Method 2--Complex TypeBundle data = new bundle ();Data.putstring ("txt", "amount, I am a complex type of data method sent to!") ");I.putextras (data);
When the return value is included, start with the Startactivityforresult (intent, Requ
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.