- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
使用adb order send a intent,模拟ACTION_BOOT_COMPLETED intent,这样我就可以debug了,不用每次都重启手机,谢谢。
最佳答案
这应该发送您想要的 Intent ...
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -c android.intent.category.HOME -n your.package.name/your.intent.receiver.class
用法
am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]
[--R COUNT] [-S] [--opengl-trace]
[--user <USER_ID> | current] <INTENT>
am startservice [--user <USER_ID> | current] <INTENT>
am force-stop [--user <USER_ID> | all | current] <PACKAGE>
am kill [--user <USER_ID> | all | current] <PACKAGE>
am kill-all
am broadcast [--user <USER_ID> | all | current] <INTENT>
am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]
[--user <USER_ID> | current]
[--no-window-animation] <COMPONENT>
am profile start [--user <USER_ID> current] <PROCESS> <FILE>
am profile stop [--user <USER_ID> current] [<PROCESS>]
am dumpheap [--user <USER_ID> current] [-n] <PROCESS> <FILE>
am set-debug-app [-w] [--persistent] <PACKAGE>
am clear-debug-app
am monitor [--gdb <port>]
am screen-compat [on|off] <PACKAGE>
am display-size [reset|WxH]
am display-density [reset|DENSITY]
am to-uri [INTENT]
am to-intent-uri [INTENT]
am switch-user <USER_ID>
am stop-user <USER_ID>
am start: start an Activity. Options are:
-D: enable debugging
-W: wait for launch to complete
--start-profiler <FILE>: start profiler and send results to <FILE>
-P <FILE>: like above, but profiling stops when app goes idle
-R: repeat the activity launch <COUNT> times. Prior to each repeat,
the top activity will be finished.
-S: force stop the target app before starting the activity
--opengl-trace: enable tracing of OpenGL functions
--user <USER_ID> | current: Specify which user to run as; if not
specified then run as the current user.
am startservice: start a Service. Options are:
--user <USER_ID> | current: Specify which user to run as; if not
specified then run as the current user.
am force-stop: force stop everything associated with <PACKAGE>.
--user <USER_ID> | all | current: Specify user to force stop;
all users if not specified.
am kill: Kill all processes associated with <PACKAGE>. Only kills.
processes that are safe to kill -- that is, will not impact the user
experience.
--user <USER_ID> | all | current: Specify user whose processes to kill;
all users if not specified.
am kill-all: Kill all background processes.
am broadcast: send a broadcast Intent. Options are:
--user <USER_ID> | all | current: Specify which user to send to; if not
specified then send to all users.
am instrument: start an Instrumentation. Typically this target <COMPONENT>
is the form <TEST_PACKAGE>/<RUNNER_CLASS>. Options are:
-r: print raw results (otherwise decode REPORT_KEY_STREAMRESULT). Use with
[-e perf true] to generate raw output for performance measurements.
-e <NAME> <VALUE>: set argument <NAME> to <VALUE>. For test runners a
common form is [-e <testrunner_flag> <value>[,<value>...]].
-p <FILE>: write profiling data to <FILE>
-w: wait for instrumentation to finish before returning. Required for
test runners.
--user <USER_ID> | current: Specify user instrumentation runs in;
current user if not specified.
--no-window-animation: turn off window animations will running.
am profile: start and stop profiler on a process. The given <PROCESS> argument
may be either a process name or pid. Options are:
--user <USER_ID> | current: When supplying a process name,
specify user of process to profile; uses current user if not specified.
am dumpheap: dump the heap of a process. The given <PROCESS> argument may
be either a process name or pid. Options are:
-n: dump native heap instead of managed heap
--user <USER_ID> | current: When supplying a process name,
specify user of process to dump; uses current user if not specified.
am set-debug-app: set application <PACKAGE> to debug. Options are:
-w: wait for debugger when application starts
--persistent: retain this value
am clear-debug-app: clear the previously set-debug-app.
am bug-report: request bug report generation; will launch UI
when done to select where it should be delivered.
am monitor: start monitoring for crashes or ANRs.
--gdb: start gdbserv on the given port at crash/ANR
am screen-compat: control screen compatibility mode of <PACKAGE>.
am display-size: override display size.
am display-density: override display density.
am to-uri: print the given Intent specification as a URI.
am to-intent-uri: print the given Intent specification as an intent: URI.
am switch-user: switch to put USER_ID in the foreground, starting
execution of that user if it is currently stopped.
am stop-user: stop execution of USER_ID, not allowing it to run any
code until a later explicit switch to it.
<INTENT> specifications include these flags and arguments:
[-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>]
[-c <CATEGORY> [-c <CATEGORY>] ...]
[-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...]
[--esn <EXTRA_KEY> ...]
[--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]
[--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]
[--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]
[--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...]
[--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...]
[--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>]
[--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]
[--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]
[--efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]
[-n <COMPONENT>] [-f <FLAGS>]
[--grant-read-uri-permission] [--grant-write-uri-permission]
[--debug-log-resolution] [--exclude-stopped-packages]
[--include-stopped-packages]
[--activity-brought-to-front] [--activity-clear-top]
[--activity-clear-when-task-reset] [--activity-exclude-from-recents]
[--activity-launched-from-history] [--activity-multiple-task]
[--activity-no-animation] [--activity-no-history]
[--activity-no-user-action] [--activity-previous-is-top]
[--activity-reorder-to-front] [--activity-reset-task-if-needed]
[--activity-single-top] [--activity-clear-task]
[--activity-task-on-home]
[--receiver-registered-only] [--receiver-replace-pending]
[--selector]
[<URI> | <PACKAGE> | <COMPONENT>]
关于android - 什么是模拟启动完成 Intent 顺序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19781661/
如果我想为收藏创建一个 Intent 。 如果用户问“他最喜欢什么”,它会显示一些建议芯片 因此它会调用与该芯片相关的任何后续 Intent 。 最喜欢的饮料 最喜欢的食物 最喜欢的电影等 我还想直接
我确信有一些显而易见的事情,但还没有找到解决这个简单问题的方法。错误是在用户猜出正确答案时尝试启动另一个 Activity 的主要 Activity : Error:(85, 23) Unresolv
public class MainActivity extends Activity { Button b; //FrameLayout fl; @Override p
我对 intentService 有点困惑。文档说,如果您向 intentService 发送多个任务( Intent ),那么它将在一个单独的线程上一个接一个地执行它们。我的问题是 - 是否可以同时
我正在尝试从其他应用程序获取 mime 类型 text/plain 的 Intent 并将该文本存储在字符串类型的变量中。它在 onCreate 方法中工作正常,但是当我使用 singleTask 作
我想知道,2个代码有什么区别? newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
如何设置我的 Activity 以响应任何类型的共享 Intent 。 我试过:- 但是这不起作用,我已经阅读了http://developer.android.co
鉴于子类具有不同的上下文以及在单击监听器后启动的不同 Activity ,父类(super class)中的代码 Intent Intent=new Intent(context,Activity.c
更新#1:更多信息添加到这篇文章的末尾 我是 Android 开发和测试的新手。 我有 3 个 Espresso 测试。第一个测试通过,但第二个不会运行,因为在第二个测试之前调用 setUp() 方法
我是 Espresso UI 测试的新手。 我在运行测试时遇到这个错误(ADT Eclipse IDE)。 该应用程序已经开发完成,并且在启动该应用程序时有很多请求正在进行。无法重写应用程序。但我需要
因此,尝试创建一个我认为是基本简历应用程序的应用程序。我有两个类(class),都有同样的问题。它说它“无法解析符号 Intent ” 谷歌部分做了,但没有任何意义.. 这是我的代码。 MainAct
我正在尝试将 user_id 值从一个 Intent 传递到另一个 Intent。我知道这是一个非常简单的过程,而且我已经这样做了好几次了。但对于下面的代码,我有点困惑。 我需要将 user_id 值
这是我将值传递给名为 choice 的类的主要 Activity 。 @Override public void onClick(View v) { // TODO Auto-generated me
我正在寻找一个 Android Intent 来翻译文本,我发现了这个: Google Translate Activity not working anymore 但我想在任务管理器中使用它。我真的
可以设置多个启动 Intent ,例如,当用户点击通知时。 让我解释一下我的具体问题: 我有一个带通知的应用程序。每个通知都会打开一个不同的 Activity (也有不同的附加功能)。 现在我想提取有
我有一个 Intent launchIntent = packageManagerForListener.getLaunchIntentForPackage(packagesForAdapter[po
List targetedShareIntents = new ArrayList(); Intent shareIntent = new Intent(android.content.Intent.
所以我试图在选择列表中的项目后启动一个新 Activity ......根据我所读的内容非常基本。我也在尝试在附加功能中发送一个值。所以我可以选择列表中的项目,然后新 Activity 开始,extr
有没有一种方法可以将一个Intent bundle 从一个 Intent 传递到另一个 Intent ,而不必提取包并单独处理每个额外的 Intent ? 例子: intent2.setExtras(
这个问题在这里已经有了答案: Android 5.0 (L) Service Intent must be explicit in Google analytics (11 个答案) 关闭 6 个月
我是一名优秀的程序员,十分优秀!