typed";Outstate.putstring ("Data_key", TempData);}The data has been saved, so where should we restore it? Careful you may have long ago found that the onCreate () method We have been using actually has a parameter of Bundle type. This parameter is NULL in general , but is stored by the onsaveinstancestate () methodbefore the activity is reclaimed by the system. This parameter takes all the data that was previously saved, and we only need to take the data out by the appropriate value method. M
(New Okbuttonlisten ());}3, in the secondactivity to implement the Monitoring OK button, press the back to mainactivity, while self-closing, and send data to mainactivity. The listening code for the OK button is as follows:Class Okbuttonlisten implements onclicklistener{public void OnClick (View v) {TODO auto-generated Method StubIntent sendintent = new Intent (secondactivity.this, Mainactivity.class); //This method is learned today, write it down! Easy to write, some of the pit daddy tutorials
);
//own code
}
The four flag bits as the name implies, are displayed in the lock screen state, unlocked, keep the screen long bright, open the screen. When the activity starts, it unlocks and displays the screen.Then in the Androidmanifest.xml file, the declaration of the activity needs to be added to the following attributes:[HTML]View Plaincopy
activity android:name=". Alarm. Alarmhandleractivity "
android:launchmode="singleinstance"
android:excludefromrecents="true"
and
Top-n 1
Query the memory usage of each process:ADB Shell Procrank
Kill a process:ADB shell kill [PID]
To view a list of processes:ADB Shell PS
To view the status of a specified process:adb shell Ps-x [PID]
To view background services information:ADB Shell Service List
To view current memory consumption:ADB Shell Cat/proc/meminfo
To view the IO memory partition:ADB Shell Cat/proc/iomem
To re-mount the system partition as a read-write partition:ADB remount
Copy files from local
This article was reproduced from: http://blog.csdn.net/fnuwfnh/article/details/46698509Recently in the learning of Android recording knowledge, found in some mobile phone normal operation of the app, on the Huawei Tablet hangs, Eclipse logcat display Mediarecorder start failed:-38. Check the information, because my app is encoded using multi-channel recording, and debugging with the Huawei tablet on the hardware can only single-track recording, does n
This article was reproduced from: http://www.jb51.net/article/48557.htmFont: [Increase decrease] Type: Reprint time: 2014-03-29 I want to commentThis article mainly describes the Android Monkey command in detail, Monkey is a tool included in the SDK, the tool is mainly used for stress testing, the need for friends can refer to the followingWhat is Monkey?Monkey is a tool that comes with the SDK.Second, the purpose of Monkey testing?: This tool is used
Android practice-Location-Based Services (get the longitude and latitude of your location + Baidu map) and android longitude and latitude
The LocationManager class must be used for implementation. The following code is used:
The. java code is as follows:
Package org. lxh. demo; import java. util. list; import android.
Android app: Let smart phones become personal guides. At the 2011 innovation China finals, James from Beijing presented their speech to everyone.Tour guideTouchChina is a traditional applicationTour guideProducts integrated with the mobile Internet. WithTourismWith the advent of the era of casual customers and the popularity of smart phones, similar products and services have also emerged. Today, we will introduce the scenery of Friends Games from Gua
Transferred from: http://www.devdiv.com/home.php?mod=spaceuid=65729do=blogid=11847Many applications for an interface such as access to the search interface or modify information and so on, in order to user experience should automatically eject the soft keyboard instead of letting the user actively click the input box to pop up (because the user entered the interface is necessarily to change information). This effect is achieved as follows:[Code]java Code:1 EditText edittext.setfocusable (t
Original URL: http://bbs.csdn.net/topics/390882717?page=11. I have a timer in my own program to go to readcharacteristic, each time read can be successful, but in the process after the call writecharacteristic found that the BLE device did not receive the set of data, Do not perform oncharacteristicwrite this callback, put the timer off do not execute readcharacteristic, only perform writecharacteristic, you can set the success, You can also receive oncharacteristicwrite, is it possible to ask s
entering a deadlock. Two lock waits are in this file to appear: Displaymanagerglobal.java, so look at Displaymanagerglobal will find the problem: Public displayinfo getdisplayinfo (int displayid) { try { synchronized (mLock) {The first is here Mlock lock competition. When calling Mdm.getdisplayinfo (Displayid) In this lock, it will call back to Displaymanagerservice, the following code: Public displayinfo getdisplayinfo (int displayid) { final int callinguid = Bin
. Jump out of parentheses as quickly as eclipseKeymap->editor Actions->complete Current Statement: The default is Ctrl+shift+enter;shift+enter no matter where the cursor is now, a new line is opened directly2. Code hints list (content assist,alt+/in eclipse)Keymap->main menu->code->completion->basic: Default is Ctrl+space3. Bug fix Prompt list (quick fix,ctrl+1 in eclipse)Keymap->other->show Intention Action: Default is Alt+enter4. Quick Overried MethodKeymap->main menu->code->override Methods:
acquire () and release () pairs appear.about int flags The effects of various types of locks on the CPU, screen, keyboard:partial_wake_lock: Keep the CPU running, and the screen and keyboard lights may be off.screen_dim_wake_lock: Keep the CPU running, allow the screen to be displayed but may be gray, allow to turn off the keyboard lightscreen_bright_wake_lock: Keeps the CPU running, allowing the screen to be highlighted, allowing the keyboard light
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.