does not use root cell phone, originally this Dumpsys usagestats is used to record which activity times and time of the program opened the information, here can be used to directly see your program to open what activity. You can try to execute the following command under cmd: adb shell "AM start-n com.tencent.mm/com.tencent.mm.ui.launcherui" phone qqadb shell "am start-n Com.tencent.mobileqq/com.tencent.mo
Android implementation does not repeatedly start the APP, androidapp
Blog reprinted: http://blog.sina.cn/dpool/blog/s/blog_5de73d0b0102vpai.html? Utm_source = bshare utm_campaign = bshare utm_medium = weixin bsh_bid = 883565991
Apps like QQ and so on generally do not open two instances.For example, open the QQ client, go to the friend chat page, and press HOME
appinfo = am.getRunningAppProcesses();for (RunningAppProcessInfo runningAppProcessInfo : appinfo) {if (runningAppProcessInfo.processName.equals("yourpakagename")) {Log.e("TAG", System.currentTimeMillis() + "");}}}
This method is more accurate than the first method without the source code.
Method 3: Call the application (shell am) to obtain the startup time.
Idea: Call the Android shell command to get the
has to prevent the restart ....Luck is really good, just have this attribute:android:configchanges=["MCC", "MNC", "locale", "touchscreen", "keyboard", "Keyboardhidden", "Navigation", " Screenlayout "," Fontscale "," Uimode "," orientation "," screensize "," Smallestscreensize "]The official explanation is this:Lists configuration changes that the activity would handle itself. When a-configuration change occurs at runtime, the activity was shut down and restarted by default, but declaring a Conf
There are a number of solutions available on the Internet, mainly in the following ways:1 shut down Windows Firewall;2 Turn off IPv6 or set IPv4 preferences, specifically: In Device Manager, Show hidden devices, disable a network device beginning with "Teredo", Increase in Eclipse.ini file (last line parameter)
OpenFile-vmargs-djava.net.preferipv4stack=true
3 Turn off the virtual NIC (virtual network adapter created by VMware, VirtualBox, etc.);My first do 2, 32 steps, have no success, f
: toast.maketext (this, "Youclickadd ", Toast.length_short). Show (); break; caseR.id.remove_item: Toast.maketext (this, "Youclickremove", toast.length_short). Show (); break; default:break;} returntrue;}}PS: Start the app, you need to solve the screen after a while to start, to start the
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.