Code Monkey home page Code Monkey logo

Comments (5)

mzlogin avatar mzlogin commented on June 12, 2024

目前没发现什么方式能直接实现……间接实现的话,在 service stop 的时候输出个 log,然后监控下 log? 😆

from awesome-adb.

TMLAndroid avatar TMLAndroid commented on June 12, 2024

恩,这个方法试了,可行是可行,就是面对批处理文件的话,就不太好处理了

from awesome-adb.

mzlogin avatar mzlogin commented on June 12, 2024

可以试试双进程 / 双线程的思路:

  1. 进程 B 监控 logcat 里的特定输出,监控到后发送一个通知信号;
  2. 进程 A 调用 startservice,然后等待通知信号,等到通知信号后才继续后面的流程。

from awesome-adb.

TMLAndroid avatar TMLAndroid commented on June 12, 2024

恩,目前没有好的办法只能这么处理了,顺便咨询一下,android开发者可以向Terminal打印日志么

from awesome-adb.

mzlogin avatar mzlogin commented on June 12, 2024

你是指 Android 应用程序吗?我不知道有这样的方法。

System.out.println 这样的也被输出到 logcat 了。我推测应该不能行,terminal 可以起很多进程实例,程序怎么知道要输出到哪一个呢?

from awesome-adb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.